Skip to content

Commit

Permalink
Move pytest and coverage config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Jul 7, 2023
1 parent bc79953 commit fdf559f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
12 changes: 0 additions & 12 deletions .coveragerc

This file was deleted.

24 changes: 23 additions & 1 deletion pyproject.toml
Expand Up @@ -36,7 +36,7 @@ github = "https://github.com/MagicStack/asyncpg"

[project.optional-dependencies]
test = [
'flake8~=5.0.4',
'flake8~=6.0.0',
'uvloop>=0.15.3; platform_system != "Windows"',
]
docs = [
Expand Down Expand Up @@ -80,3 +80,25 @@ test-command = """\
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))" \
&& su -l apgtest -c "$PY {project}/tests/__init__.py" \
"""

[tool.pytest.ini_options]
addopts = "--capture=no --assert=plain --strict-markers --tb=native --import-mode=importlib"
testpaths = "tests"
filterwarnings = "default"

[tool.coverage.run]
branch = true
plugins = ["Cython.Coverage"]
parallel = true
source = ["asyncpg/", "tests/"]
omit = ["*.pxd"]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if debug",
"raise NotImplementedError",
"if __name__ == .__main__.",
]
show_missing = true
4 changes: 0 additions & 4 deletions pytest.ini

This file was deleted.

0 comments on commit fdf559f

Please sign in to comment.