-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpyproject.toml
64 lines (57 loc) · 1.75 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[tool.pytest.ini_options]
django_debug_mode = true
testpaths = "tests"
# Options used for every pytest command:
# - Run tests marked with the "unit" marker (run performance tests with `-m performance`)
# - Generate branch coverage report for the "corgi/" directory in the terminal
# - Show extra test summary info ("a" == (a)ll)
# - Report on the ten slowest tests
# - Skip applying migrations to save on DB-setup time
# - Ensure pytest config here is valid, and all defined markers are specified below in `markers`
addopts = """
-m unit
--cov corgi --cov-branch --cov-report term-missing:skip-covered
-ra
--durations=10
--nomigrations
--strict-config --strict-markers
"""
markers = [
"django_db",
"integration",
"performance",
"unit",
]
filterwarnings = [
# make warnings into errors that fail tests
"error",
# except DeprecationWarnings from libraries
"ignore::DeprecationWarning"
]
[tool.black]
line-length = 100
[tool.coverage.run]
omit = ["corgi/**/migrations/*", "corgi/web/static/*.json", "corgi/web/templates/*.html"]
plugins = ["django_coverage_plugin"]
[tool.coverage.django_coverage_plugin]
template_extensions = "html, json"
[tool.coverage.report]
include_namespace_packages = true
# Default report procision is 0, but --cov-fail-under fails at 69.66% / 70% anyway
# Make report match to avoid confusion
precision = 2
show_missing = true
skip_covered = true
skip_empty = true
sort = "Cover"
[tool.isort]
profile = "black"
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
warn_return_any = false
warn_unused_configs = true
plugins = ["mypy_django_plugin.main", "mypy_drf_plugin.main"]
exclude = ["corgi/core/migrations", "corgi/collectors/migrations"]
[tool.django-stubs]
django_settings_module = "config.settings.test"