Skip to content

Commit

Permalink
Improve pytest config
Browse files Browse the repository at this point in the history
  • Loading branch information
xymy committed Dec 3, 2023
1 parent 3b972b7 commit 1e445a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ lint = [
"mypy {root}{/}src {root}{/}tests",
]
test = [
"coverage erase",
"python -m pytest -o cache_dir={root}{/}.cache{/}pytest --cov-report=html:{root}{/}htmlcov {args}",
"coverage report",
"python -m coverage erase",
"python -m pytest --cov-report=html:{root}{/}htmlcov {args}",
"python -m coverage report",
]

[tool.black]
Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extras =
test
commands =
coverage erase
python -m pytest -v -o cache_dir={envdir}{/}.cache{/}pytest \
pytest -v -o cache_dir={envdir}{/}.cache{/}pytest \
--cov-report=html:{envdir}{/}htmlcov {posargs}
coverage report

Expand Down Expand Up @@ -50,12 +50,10 @@ system_site_packages = true

[pytest]
addopts = --strict-markers --cov --cov-context=test
cache_dir = .cache/pytest
filterwarnings =
error
ignore::DeprecationWarning
required_plugins =
hypothesis
pytest-cov
testpaths =
tests
xfail_strict = true
Expand Down

0 comments on commit 1e445a6

Please sign in to comment.