Skip to content

Commit

Permalink
chore: move pytest and coverage configuration in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Feb 11, 2025
1 parent 9965445 commit 62a0081
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 19 deletions.
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,21 @@ version = {attr = "authlib.__version__"}
[tool.setuptools.packages.find]
where = ["."]
include = ["authlib", "authlib.*"]

[tool.pytest]
asyncio_mode = "auto"
python_files = "test*.py"
norecursedirs = ["authlib", "build", "dist", "docs", "htmlcov"]

[tool.coverage.run]
branch = true

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"except ImportError",
"def __repr__",
"raise NotImplementedError",
"raise DeprecationWarning",
"deprecate",
]
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ universal = 1
[check-manifest]
ignore =
tox.ini

[tool:pytest]
python_files = test*.py
norecursedirs = authlib build dist docs htmlcov
15 changes: 0 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,9 @@ setenv =
commands =
coverage run --source=authlib -p -m pytest {posargs: {env:TESTPATH}}

[pytest]
asyncio_mode = auto

[testenv:coverage]
skip_install = true
commands =
coverage combine
coverage report
coverage html

[coverage:run]
branch = True

[coverage:report]
exclude_lines =
pragma: no cover
except ImportError
def __repr__
raise NotImplementedError
raise DeprecationWarning
deprecate

0 comments on commit 62a0081

Please sign in to comment.