-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Incorrect Cobertura file sources generated #439
Comments
Can you provide me with a reproducible scenario? |
Original comment by Arcadiy Ivanov (Bitbucket: arcivanov, GitHub: arcivanov)
Let me see if there are any public projects available you can look at (all mine are private). |
Original comment by Arcadiy Ivanov (Bitbucket: arcivanov, GitHub: arcivanov) Another place where "relative path" is used relative to current directory and not the config.source relative to which the file was found https://github.com/nedbat/coveragepy/blob/master/coverage/python.py#L114 |
@arcivanov Hmm, I'm afraid I need a considerably greater level of detail in the instructions in order to duplicate your issue. |
If you could use Python Builder to make a small project, and attach a zip file here, it'll be easier for me to assess the problem and the solution. Or perhaps if the pull request had some tests? |
Yes, thanks, this reproduces the behavior. I need to understand what's happening at the API level now. |
@arcivanov just to be clear: your PR doesn't demonstrate the problem, it contains a fix. I want to see and understand the problem for myself. This is on my list, I will get to it soon. |
Fixed in de878ba211c4 (bb), will be 4.0.3 |
Originally reported by Arcadiy Ivanov (Bitbucket: arcivanov, GitHub: arcivanov)
Consider the following snippet.
Observe
<source>/Users/arcivanov/Documents/src/cschcs/cschcs-manager
Observe
filename="another_api/models.py" line-rate="1" name="models.py"
The problem is, this is
pyb
and the sources are actually located insrc/main/python
.Unfortunately,
coverage
simply uses current directory for sources for unknown reason (https://github.com/nedbat/coveragepy/blob/master/coverage/xmlreport.py#L146) -files.relative_directory()
is always current dir and disregardsCoverage(source=['src/main/python'])
The expected result would, naturally, be
<source>/Users/arcivanov/Documents/src/cschcs/cschcs-manager/src/main/python
The text was updated successfully, but these errors were encountered: