Skip to content
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

Package: fall back to fspath for nodeid #202

Merged
merged 2 commits into from
Feb 24, 2020
Merged

Conversation

blueyed
Copy link
Owner

@blueyed blueyed commented Feb 9, 2020

This is relevant for pytest t/foo.py --rootdir=/tmp.

Before:

../../../../tmp F.sxx                                                                                                                                    [100%]
…
t/vt.py:5: ValueError
…
FAILED ../../../../tmp/::test_fail - ValueError

After: ../../../../tmp/…/t/vt.py

TODO:

  • _shorten_path: prefer absolute (shorter) path (/tmp/…/t/vt.py)

Upstream: pytest-dev#6701

@blueyed
Copy link
Owner Author

blueyed commented Feb 10, 2020

Closing in favor of pytest-dev#6701 for now.

@blueyed blueyed closed this Feb 10, 2020
@blueyed blueyed deleted the package-nodeid-abs branch February 10, 2020 01:54
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.
@blueyed blueyed restored the package-nodeid-abs branch February 24, 2020 19:52
@blueyed blueyed reopened this Feb 24, 2020
@blueyed blueyed merged commit 78f94b2 into my-master Feb 24, 2020
@blueyed blueyed deleted the package-nodeid-abs branch February 24, 2020 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant