2020-12-09 21:24:56 +03:00
|
|
|
[tool.black]
|
|
|
|
line-length = 88
|
|
|
|
target-version = ['py38']
|
|
|
|
skip-string-normalization = true
|
|
|
|
exclude = '''
|
|
|
|
(
|
|
|
|
/(
|
|
|
|
docs
|
|
|
|
| node_modules
|
|
|
|
| build*.py
|
|
|
|
| media
|
|
|
|
| storage
|
|
|
|
| logs
|
|
|
|
| site-static
|
|
|
|
| static
|
|
|
|
| \.git
|
|
|
|
| \.npm
|
|
|
|
)/
|
|
|
|
| src/.*/migrations/.*\.py
|
|
|
|
| src/olympia/translations/tests/testapp/migrations/.*\.py
|
2021-02-03 15:52:30 +03:00
|
|
|
| src/django-babel/.*\.py
|
2020-12-09 21:24:56 +03:00
|
|
|
)
|
|
|
|
'''
|
2021-02-03 15:52:30 +03:00
|
|
|
|
|
|
|
[tool.pytest.ini_options]
|
|
|
|
addopts = "-vs --reuse-db --showlocals --tb=short"
|
|
|
|
python_files = "test*.py"
|
|
|
|
norecursedirs = [
|
|
|
|
"node_modules",
|
|
|
|
"locale",
|
|
|
|
"static",
|
|
|
|
"media",
|
|
|
|
"site-static",
|
|
|
|
"user-media",
|
|
|
|
"tmp",
|
|
|
|
"templates",
|
|
|
|
"fixtures",
|
|
|
|
"migrations",
|
|
|
|
".*",
|
|
|
|
"*.egg",
|
|
|
|
"dist",
|
|
|
|
"cache",
|
|
|
|
"venv",
|
|
|
|
"__pycache__",
|
|
|
|
]
|
|
|
|
DJANGO_SETTINGS_MODULE = "settings_test"
|
|
|
|
# Ignoring csp deprecation warnings, we have control over the module and
|
|
|
|
# currently it warns for child-src which is deprecated in CSPv3 but we're still
|
|
|
|
# on CSP 2 while CSP 3 is still in working draft (sept 2018)
|
|
|
|
filterwarnings = [
|
|
|
|
"default",
|
|
|
|
"ignore:::csp.utils",
|
|
|
|
# Ignore ResourceWarning for now. It's a Python 3 thing :-/
|
|
|
|
"ignore::ResourceWarning",
|
|
|
|
]
|
|
|
|
markers = [
|
|
|
|
"es_tests: mark a test as an elasticsearch test.",
|
|
|
|
"needs_locales_compilation: mark a test as needing compiled locales to work.",
|
|
|
|
"allow_external_http_requests: mark a test to allow external http requests and disable responses.",
|
|
|
|
"static_assets: Tests that are depending on `compress_assets` and require to be separated with other tests.",
|
|
|
|
"internal_routes_allowed: mark a test as needing INTERNAL_ROUTES_ALLOWED=True.",
|
|
|
|
]
|