-
-
Notifications
You must be signed in to change notification settings - Fork 652
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
In V2 task output (e.g. Pytest), restore the source root #7714
Labels
Comments
@Eric-Arellano : AFAIK, the test file renaming is accomplished by pants/src/python/pants/backend/python/tasks/pytest_run.py Lines 391 to 454 in 12a5d7b
|
No longer relevant with #8063. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For absolute imports to work, we must strip the source root (e.g.
src/python
). We do this in #7696 by stripping the source root prefix of all files before passing it to Pytest.However, this results in Pytest's stdout showing the stripped file names rather than the full name. Pants will still output the full path in the surrounding log, like this, but Pytest won't:
In V1, we appear to restore the full path by saving the output to a Junit XML file and then injecting the full name:
pants/src/python/pants/backend/python/tasks/pytest_run.py
Lines 596 to 601 in 9464d7e
The text was updated successfully, but these errors were encountered: