It took a while for me to understand why my setup.cfg setting was only applying to some tests. Hopefully these comments will save someone else some confusion.
51 lines
2.5 KiB
INI
51 lines
2.5 KiB
INI
[tool:pytest]
|
|
# Note: The first file of settings found is used, there is no combining, so
|
|
# this file is only used for tests that don't find a pytest.ini file first.
|
|
# Details at https://docs.pytest.org/en/latest/reference/customize.html
|
|
|
|
DJANGO_SETTINGS_MODULE = lms.envs.test
|
|
addopts = --nomigrations --reuse-db --durations=20 --json-report --json-report-omit keywords streams collectors log traceback tests --json-report-file=none
|
|
# Enable default handling for all warnings, including those that are ignored by default;
|
|
# but hide rate-limit warnings (because we deliberately don't throttle test user logins)
|
|
# and field_data deprecation warnings (because fixing them requires a major low-priority refactoring)
|
|
filterwarnings =
|
|
default
|
|
ignore:No request passed to the backend, unable to rate-limit:UserWarning
|
|
ignore::xblock.exceptions.FieldDataDeprecationWarning
|
|
ignore::django.utils.deprecation.RemovedInDjango40Warning
|
|
ignore::django.utils.deprecation.RemovedInDjango41Warning
|
|
junit_family = xunit2
|
|
norecursedirs = .* *.egg build conf dist node_modules test_root cms/envs lms/envs
|
|
python_classes =
|
|
python_files = tests.py test_*.py tests_*.py *_tests.py __init__.py
|
|
|
|
[pycodestyle]
|
|
# error codes: https://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
|
|
# E501: line too long
|
|
# E265: block comment should start with '# '
|
|
# We ignore this because pep8 used to erroneously lump E266 into it also.
|
|
# We should probably fix these now.
|
|
# E266: too many leading '#' for block comment
|
|
# We have lots of comments that look like "##### HEADING #####" which violate
|
|
# this rule, because they don't have a space after the first #. However,
|
|
# they're still perfectly reasonable comments, so we disable this rule.
|
|
# W602: deprecated form of raising exception
|
|
# We do this in a few places to modify the exception message while preserving
|
|
# the traceback. See this blog post for more info:
|
|
# http://nedbatchelder.com/blog/200711/rethrowing_exceptions_in_python.html
|
|
# It's a little unusual, but we have good reasons for doing so, so we disable
|
|
# this rule.
|
|
# E305,E402,E722,E731,E741,E743,W503,W504: errors and warnings added since pep8/pycodestyle
|
|
# 1.5.7 that we haven't cleaned up yet
|
|
ignore=E265,E266,E305,E402,E501,E722,E731,E741,E743,W503,W504,W602
|
|
exclude=migrations,.git,.pycharm_helpers,.tox,test_root/staticfiles,node_modules
|
|
|
|
[isort]
|
|
indent=' '
|
|
line_length=120
|
|
multi_line_output=3
|
|
skip=
|
|
envs
|
|
migrations
|
|
common/lib/safe_lxml/safe_lxml/etree.py
|