New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source full path #573
Comments
Oh, sorry, forgot to mention how I'm running the whole thing via Gradle Python plugin. |
I am also facing the same issue. |
Try adding this setting to your .coveragerc file (or other setting file): relative_files:
|
worked for me thanks |
Team,
I'm trying to set up Python build in a project which is 'governed' by Gradle.
I'm also trying to use Gradle/Maven-conventional source path for Python files (src/main/python, src/test/python).
In general, everything works fine and as expected with one caveat (for me, specifically).
I'm using
pytest
withpytest.ini
where I setpytest-cov
configuration with the following:and corresponding
.coveragerc
:The problem I'm having is the path to the source files in the
python.xml
test coverage report.It seems to prefix the
src/main/python
with the output of thepwd
command and I'm effectively getting stuff likewhere
/home/jenkins/workspace/pipeline-name-here/application/
is that annoying prefix I'm need to get rid of.My Gradle folder structure (w/service folders omitted) is like
|-- Git-name-of-the-project |--- ansible |--- ansible files |--- application |--- <temp build-related folders> |--- src |--- main |--- python |--- python-file.py |--- gradlew <etc> |--- .coveragerc |--- pytest.ini
Any suggestions?
The text was updated successfully, but these errors were encountered: