Skip to content

Commit

Permalink
chore: Use correct pytest options
Browse files Browse the repository at this point in the history
  • Loading branch information
georgedouzas committed Dec 12, 2024
1 parent 44539df commit dd92ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ def tests(session: nox.Session) -> None:
session.run('pdm', 'install', '-dG', 'tests', external=True)
env = {'COVERAGE_FILE': f'.coverage.{session.python}'}
if session.posargs:
session.run('pytest', '-n', 'auto', '--dist=loadgroup', '-k', *session.posargs, 'tests', env=env)
session.run('pytest', '-k', *session.posargs, env=env)
else:
session.run('pytest', '-n', 'auto', '--dist=loadgroup', 'tests', env=env)
session.run('pytest', env=env)
session.run('coverage', 'combine')
session.run('coverage', 'report')
session.run('coverage', 'html')
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ warn_unused_ignores = true
show_error_codes = true

[tool.pytest.ini_options]
python_files = ["test_*.py"]
addopts = "--cov"
testpaths = ["tests"]
addopts = ["--cov", "--doctest-modules", "--dist=loadgroup", "-n=auto"]
testpaths = ["src", "tests"]

[tool.coverage.run]
branch = true
Expand Down

0 comments on commit dd92ce5

Please sign in to comment.