Rewrite coverage paths
Since tox is running tests on the installed package, the coverage paths are no more relative to the repository root.
This commit is contained in:
+8
-5
@@ -2,14 +2,14 @@
|
||||
envlist = py310,py311,py312,py313,py314
|
||||
|
||||
[testenv]
|
||||
changedir = {toxworkdir}
|
||||
changedir = {env_site_packages_dir}
|
||||
extras = test
|
||||
commands =
|
||||
coverage run --source=trytond --omit=*/tests/* -m xmlrunner discover -s trytond.tests {posargs}
|
||||
coverage run -a --source=trytond_gis --omit=*/tests/* -m xmlrunner discover -s trytond_gis.tests {posargs}
|
||||
coverage run --rcfile={toxinidir}/tox.ini --source=trytond --omit=*/tests/* -m xmlrunner discover -s trytond.tests {posargs}
|
||||
coverage run --rcfile={toxinidir}/tox.ini --source=trytond_gis --omit=*/tests/* -m xmlrunner discover -s trytond_gis.tests {posargs}
|
||||
commands_post =
|
||||
coverage report
|
||||
coverage xml
|
||||
coverage report --rcfile={toxinidir}/tox.ini
|
||||
coverage xml --rcfile={toxinidir}/tox.ini -o {package_root}/coverage.xml
|
||||
deps =
|
||||
coverage
|
||||
unittest-xml-reporting
|
||||
@@ -17,3 +17,6 @@ passenv = *
|
||||
setenv =
|
||||
TRYTOND_DATABASE_URI={env:POSTGIS_URI:postgis://}
|
||||
DB_NAME={env:DB_NAME:test}
|
||||
|
||||
[coverage:run]
|
||||
relative_files = true
|
||||
|
||||
Reference in New Issue
Block a user