Azure / pytest-azurepipelines

Plugin for pytest that makes it simple to work with Azure Pipelines
MIT License
113 stars 36 forks source link

Module ignores explicitly set coverage xml output path #53

Closed Christian-Schultz closed 1 year ago

Christian-Schultz commented 3 years ago

If I run pytest --cov=/app --cov-report=xml:/app/reports/coverage.xml the pytest-cov xml file is written to /app/coverage.xml and not in /app/reports/coverage.xml as expected. This is specific to xml, it works fine with html. It works as intended if I uninstall pytest-azurepipelines.

Tested in a Docker environment. I'll be happy to provide a minimal non-working example if necessary.

Christian-Schultz commented 3 years ago

It should be an easy fix Line 13 should be replaced by os.environ.get("DEFAULT_COVERAGE_PATH", "coverage.xml")

os.path.expandvars could be skipped in line 70 as well. I'd be happy to provide a pull request if this package is still maintained.