-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
FSCollector: use session._node_location_to_relpath #6701
Conversation
4d1836a
to
ec05d8d
Compare
ec05d8d
to
bcc267a
Compare
This is relevant for `pytest t/foo.py --rootdir=/tmp`. Before: ``` ../../../../tmp F.sxx … t/foo.py:5: ValueError … FAILED ../../../../tmp/::test_fail - ValueError ``` This removes `_check_initialpaths_for_relpath` (added via pytest-dev#2776 to address part of the issue), but it is apparently bad trying to make them relative to any given arg, when they are meant to be relative to `rootdir` really.
bcc267a
to
27766e7
Compare
Using |
afcbbec
to
bcb2db2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as far as i can gather,this bugfix implies a breaking change
as the nodeids for everyone using --pyargs are liekly to change,
this has to be part of a breaking release as it affects reporting, reporting metadata, and thus may break subsequent processes at users
"test_hello.py::test_hello*PASSED*", | ||
"test_hello.py::test_other*PASSED*", | ||
"rootdir: {}/world".format(testdir.tmpdir), | ||
"../hello/ns_pkg/hello/test_hello.py::test_hello PASSED *", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this indicates a breaking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node ids are documented to be relative to the rootdir, so this looks like a bugfix to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some bugfixes are breaking changes, based on the required output change here, this is a breaking change
i wll have to crosscheck as im realatively sure that this change would break reporting continuitiy in at least one work project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @RonnyPfannschmidt
i verified that this changes thousands of test ids that previously didn't contain certain path elements |
I still think this is a bug though. |
Have it your way, you made clear what you value |
Maybe related/fixes #3714.
_check_initialpaths_for_relpath
was added in #2776 (14b6380).The adjusted test for it still works, and was hardened inbetween (and fixed here).