(test) tweak pytest coverage options

- remove redundant options (unchanged from defaults)
- don't test 3rd party code
- omit fully covered files from coverage report
- gitignore junit (xml) test output directory
This commit is contained in:
Eugene Brodsky 2023-01-26 19:45:04 -05:00
parent c5a9e70e7f
commit b58a80109b
2 changed files with 3 additions and 6 deletions

1
.gitignore vendored
View File

@ -72,6 +72,7 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
junit/
# Translations
*.mo

View File

@ -87,7 +87,7 @@ dependencies = [
"mkdocs-git-revision-date-localized-plugin",
"mkdocs-redirects==1.2.0",
]
test = ["pytest>6.0.0", "pytest-cov"]
"test" = ["pytest>6.0.0", "pytest-cov"]
[project.scripts]
"configure_invokeai" = "ldm.invoke.configure_invokeai:main"
@ -119,8 +119,4 @@ version = { attr = "ldm.invoke.__version__" }
configs = ["models.yaml"]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-p pytest_cov --junitxml=junit/test-results.xml --cov=./ldm/ --cov=./backend --cov-branch"
python_files = ["test_*.py"]
pythonpath = [".venv/lib/python3.9", ".venv/lib/python3.10"]
testpaths = ["tests"]
addopts = "-p pytest_cov --junitxml=junit/test-results.xml --cov-report=term:skip-covered --cov=ldm/invoke --cov=backend --cov-branch"