-
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathpyproject.toml
More file actions
227 lines (212 loc) · 7.51 KB
/
Copy pathpyproject.toml
File metadata and controls
227 lines (212 loc) · 7.51 KB
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "schemathesis"
version = "4.29.3"
description = "Adaptive API testing for OpenAPI and GraphQL"
keywords = ["pytest", "hypothesis", "openapi", "graphql", "testing", "fuzzing", "adaptive"]
authors = [{ name = "Dmitry Dygalo", email = "dmitry@dygalo.dev" }]
maintainers = [{ name = "Dmitry Dygalo", email = "dmitry@dygalo.dev" }]
requires-python = ">=3.10"
license = "MIT"
readme = "README.md"
include = ["src/schemathesis/py.typed"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: Pytest",
"Framework :: Hypothesis",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Testing",
]
dependencies = [
"anyio>=4.5,<5",
"click>=8.0,<9",
"harfile>=0.5.0,<1.0",
"hypothesis>=6.130.12,<7",
"hypothesis_graphql>=0.13.2,<1",
"jsonschema_rs>=0.58.5,<0.59.0",
"pyrate-limiter>=4.0,<5.0",
"pytest>=8.4,<10",
"PyYAML>=5.1,<7.0",
"requests>=2.22,<3",
"rich>=13.9.4",
"tomli>=2.2.1; python_version < '3.11'",
"typing-extensions>=4.12.2",
"werkzeug>=0.16.0,<4",
]
[project.optional-dependencies]
tests = [
"coverage>=6",
"Django>=5.2,<6",
"fastapi>=0.86.0",
"Flask>=2.1.1,<4.0",
"httpx>=0.22.0,<1.0",
"httpx2>=2.12.0,<3.0",
"pydantic>=1.10.2",
"pytest-asyncio>=1.0,<2.0",
"pytest-httpserver>=1.0,<2.0",
"pytest-mock>=3.7.0,<4.0",
"pytest-trio>=0.8,<1.0",
"pytest-xdist>=3,<4.0",
"strawberry-graphql[fastapi]>=0.109.0",
"syrupy>=5.4,<5.5",
"tomli-w>=1.2.0",
"allure-python-commons>=2.13.0",
"allure-pytest>=2.13.0",
"trustme>=0.9.0,<2.0",
"uvicorn>=0.20,<1.0",
]
allure = ["allure-python-commons>=2.13.0"]
cov = ["coverage-enable-subprocess", "coverage[toml]>=5.3"]
bench = ["pytest-codspeed==5.0.3"]
docs = ["mkdocs-material", "mkdocstrings[python]"]
profiling = ["pyinstrument>=5.1"]
scripts = ["tracecov>=0.21", "seaborn>=0.13"]
dev = ["schemathesis[tests,cov,bench,docs,scripts]"]
[project.urls]
Documentation = "https://schemathesis.readthedocs.io/en/stable/"
Changelog = "https://github.com/schemathesis/schemathesis/blob/master/CHANGELOG.md"
"Bug Tracker" = "https://github.com/schemathesis/schemathesis"
Funding = "https://github.com/sponsors/Stranger6667"
"Source Code" = "https://github.com/schemathesis/schemathesis"
[project.scripts]
schemathesis = "schemathesis.cli:schemathesis"
st = "schemathesis.cli:schemathesis"
[project.entry-points.pytest11]
schemathesis = "schemathesis.pytest.plugin"
[tool.hatch.build.targets.sdist]
exclude = [
"/corpus",
"/test-corpus",
"/scripts",
"/tools",
"/img",
"/benches",
]
[tool.pytest.ini_options]
addopts = ["-ra", "--strict-markers", "--strict-config"]
xfail_strict = true
truncation_limit_lines = 0
truncation_limit_chars = 0
testpaths = "test"
norecursedirs = ".hypothesis .idea .git src docs .pytest_cache .mypy_cache .tox"
filterwarnings = [
"error::pytest.PytestUnraisableExceptionWarning",
# anyio streams not closed during async test teardown (flaky on Python 3.13+)
"ignore:Unclosed <MemoryObject.*:ResourceWarning",
"ignore:.*Unclosed <MemoryObject.*:pytest.PytestUnraisableExceptionWarning",
# urllib3/http.client response finalizer raises ValueError on Python 3.14t free-threading GC
"ignore:Exception ignored while finalizing file <urllib3.response.HTTPResponse.*:pytest.PytestUnraisableExceptionWarning",
"ignore:Exception ignored while finalizing file <http.client.HTTPResponse.*:pytest.PytestUnraisableExceptionWarning",
# asyncio event loop / anyio stream deallocators raise on Python 3.14t free-threading GC
"ignore:Exception ignored while calling deallocator <function BaseEventLoop.__del__.*:pytest.PytestUnraisableExceptionWarning",
"ignore:Exception ignored while calling deallocator <function MemoryObject.*.__del__.*:pytest.PytestUnraisableExceptionWarning",
"ignore:Exception ignored in.*<function MemoryObject.*.__del__.*:pytest.PytestUnraisableExceptionWarning",
# unclosed socket from test server teardown (flaky on Python 3.12+)
"ignore:Exception ignored in.*<socket.socket.*:pytest.PytestUnraisableExceptionWarning",
"ignore:Exception ignored while finalizing socket <socket.socket.*:pytest.PytestUnraisableExceptionWarning",
"ignore:unclosed <socket.socket.*:ResourceWarning",
]
[tool.coverage.run]
parallel = true
branch = true
source_pkgs = ["schemathesis"]
[tool.coverage.paths]
source = [
"src",
".tox/*/site-packages",
".tox/*/Lib/site-packages",
".tox/*/lib/*/site-packages",
"*/.tox/*/site-packages",
"*/.tox/*/Lib/site-packages",
"*/.tox/*/lib/*/site-packages",
]
[tool.coverage.report]
show_missing = true
skip_covered = true
precision = 2
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C", # flake8-comprehensions
"B", # flake8-bugbear
"D", # pydocstyle
"T201", # flake8-print
"I", # isort
"FURB", # refurb
"PGH003", # blanket-type-ignore
"TID251", # banned-api
"UP", # pyupgrade
"SIM" # flake8-simplify
]
ignore = [
"E501", # Line too long
"B008", # Do not perform function calls in argument defaults
"C901", # Too complex
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D107", # Missing docstring in `__init__`
"D203", # One blank line before class
"D213", # Multiline summary second line
"D401", # Imperative mood
"COM812", # twice "," in dict/tuple/list
"SIM910", # delete default arguments in .get() in some cases
"SIM108", # ternary expressions are not always readable
"SIM105" # contextlib.suppress is less performant in many cases
]
[tool.ruff.lint.per-file-ignores]
"test/apps/__main__.py" = ["T201"] # CLI entrypoint
"scripts/coverage/audit.py" = ["T201", "E402"] # CLI entrypoint; E402: sys.path setup precedes tools.* imports
"scripts/coverage/triage.py" = ["T201"] # CLI entrypoint
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"copy.deepcopy".msg = "Use `schemathesis.core.transforms.deepclone`, which is much faster on the JSON-shaped data this project copies."
"unittest.mock.MagicMock".msg = "Tests build real schemas, apps and responses via the `ctx`, `case_factory` and `response_factory` fixtures."
"unittest.mock.Mock".msg = "Tests build real schemas, apps and responses via the `ctx`, `case_factory` and `response_factory` fixtures."
[tool.ruff.lint.isort]
known-first-party = ["schemathesis", "tools"]
known-third-party = [
"_pytest",
"click",
"fastapi",
"flask",
"graphene",
"graphql",
"graphql_server",
"hypothesis",
"hypothesis_graphql",
"packaging",
"pydantic",
"pytest",
"requests",
"urllib3",
"werkzeug",
"yaml",
]
[tool.ruff.format]
skip-magic-trailing-comma = false