Skip to content

Commit fdf559f

Browse files
committed
Move pytest and coverage config to pyproject.toml
1 parent bc79953 commit fdf559f

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

.coveragerc

-12
This file was deleted.

pyproject.toml

+23-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ github = "https://github.com/MagicStack/asyncpg"
3636

3737
[project.optional-dependencies]
3838
test = [
39-
'flake8~=5.0.4',
39+
'flake8~=6.0.0',
4040
'uvloop>=0.15.3; platform_system != "Windows"',
4141
]
4242
docs = [
@@ -80,3 +80,25 @@ test-command = """\
8080
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))" \
8181
&& su -l apgtest -c "$PY {project}/tests/__init__.py" \
8282
"""
83+
84+
[tool.pytest.ini_options]
85+
addopts = "--capture=no --assert=plain --strict-markers --tb=native --import-mode=importlib"
86+
testpaths = "tests"
87+
filterwarnings = "default"
88+
89+
[tool.coverage.run]
90+
branch = true
91+
plugins = ["Cython.Coverage"]
92+
parallel = true
93+
source = ["asyncpg/", "tests/"]
94+
omit = ["*.pxd"]
95+
96+
[tool.coverage.report]
97+
exclude_lines = [
98+
"pragma: no cover",
99+
"def __repr__",
100+
"if debug",
101+
"raise NotImplementedError",
102+
"if __name__ == .__main__.",
103+
]
104+
show_missing = true

pytest.ini

-4
This file was deleted.

0 commit comments

Comments
 (0)