Skip to content

Commit c247f43

Browse files
combine pytest.ini with pyproject.toml
1 parent 3d6a358 commit c247f43

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.pytest.ini

-5
This file was deleted.

coverage/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore everything in this directory
2+
*
3+
# Except this file
4+
!.gitignore

pyproject.toml

+17-1
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,24 @@ version = { attr = "invokeai.version.__version__" }
142142
"invokeai.configs" = ["*.example", "**/*.yaml", "*.txt"]
143143
"invokeai.frontend.web.dist" = ["**"]
144144

145+
#=== Begin: PyTest and Coverage
145146
[tool.pytest.ini_options]
146-
addopts = "-p pytest_cov --junitxml=junit/test-results.xml --cov-report=term:skip-covered --cov=ldm/invoke --cov=backend --cov-branch"
147+
addopts = "--cov-report term --cov-report html --cov-report xml"
148+
[tool.coverage.run]
149+
branch = true
150+
source = ["invokeai"]
151+
omit = ["*tests*", "*migrations*", ".venv/*", "*.env"]
152+
[tool.coverage.report]
153+
show_missing = true
154+
fail_under = 85 # let's set something sensible on Day 1 ...
155+
[tool.coverage.json]
156+
output = "coverage/coverage.json"
157+
pretty_print = true
158+
[tool.coverage.html]
159+
directory = "coverage/html"
160+
[tool.coverage.xml]
161+
output = "coverage/index.xml"
162+
#=== End: PyTest and Coverage
147163

148164
[flake8]
149165
max-line-length = 120

0 commit comments

Comments
 (0)