-
Notifications
You must be signed in to change notification settings - Fork 345
/
pyproject.toml
153 lines (144 loc) · 3.87 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
[build-system]
requires = [
"setuptools>=61.0.0",
"setuptools-scm[toml]>=5.0.0",
]
build-backend = "setuptools.build_meta"
[project]
name = "pytest-django"
description = "A Django plugin for pytest."
readme = "README.rst"
requires-python = ">=3.8"
dynamic = ["version"]
authors = [
{ name = "Andreas Pelme", email = "andreas@pelme.se" },
]
maintainers = [
{ name = "Andreas Pelme", email = "andreas@pelme.se" },
]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Testing",
]
dependencies = [
"pytest>=7.0.0",
]
[project.optional-dependencies]
docs = [
"sphinx",
"sphinx_rtd_theme",
]
testing = [
"Django",
"django-configurations>=2.0",
]
[project.urls]
Documentation = "https://pytest-django.readthedocs.io/"
Repository = "https://github.com/pytest-dev/pytest-django"
Changelog = "https://pytest-django.readthedocs.io/en/latest/changelog.html"
[project.entry-points.pytest11]
django = "pytest_django.plugin"
[tool.setuptools]
packages = ["pytest_django"]
[tool.setuptools.package-data]
pytest_django = ["py.typed"]
[tool.setuptools_scm]
write_to = "pytest_django/_version.py"
[tool.pytest.ini_options]
addopts = [
# Error on using unregistered marker.
"--strict-markers",
# Show extra test summary info for everything.
"-ra",
]
pythonpath = ["."]
DJANGO_SETTINGS_MODULE = "pytest_django_test.settings_sqlite_file"
testpaths = ["tests"]
markers = ["tag1", "tag2", "tag3", "tag4", "tag5"]
[tool.mypy]
strict = true
disallow_incomplete_defs = false
disallow_untyped_defs = false
disallow_subclassing_any = false
files = [
"pytest_django",
"pytest_django_test",
"tests",
]
[[tool.mypy.overrides]]
module = [
"django.*",
"configurations.*",
]
ignore_missing_imports = true
[tool.coverage.run]
parallel = true
source = ["${PYTESTDJANGO_COVERAGE_SRC}."]
branch = true
[tool.coverage.report]
include = [
"pytest_django/*",
"pytest_django_test/*",
"tests/*",
]
skip_covered = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]
[tool.ruff]
line-length = 99
extend-exclude = [
"pytest_django/_version.py",
]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"DTZ", # flake8-datetimez
"FA", # flake8-future-annotations
"G", # flake8-logging-format
"I", # isort
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RUF", # Ruff-specific rules
"SLOT", # flake8-slots
"T10", # flake8-debugger
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
"PLR0913", # Too many arguments in function definition
"PLR2004", # Magic value used in comparison, consider replacing 3 with a constant variable
"PT001", # Use `@pytest.fixture()` over `@pytest.fixture`
"PT004", # Fixture `fixture_with_db` does not return anything, add leading underscore
"PT023", # Use `@pytest.mark.django_db()` over `@pytest.mark.django_db`
]
[tool.ruff.lint.isort]
forced-separate = [
"tests",
"pytest_django",
"pytest_django_test",
]
combine-as-imports = true
split-on-trailing-comma = false
lines-after-imports = 2