Running pytest with "--pyargs" will result in Items with empty "parent.nodeid" if run from a different root directory #2775
Labels
Comments
nicoddemus
added a commit
that referenced
this issue
Nov 12, 2017
Fix #2775 - running pytest with "--pyargs" will result in Items with …
I think comparing it / making it relative to the rootdir is what is expected, but it should make it relative always (see #6701 for a followup). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running pytest with "--pyargs" from a directory that isn't a parent directory of the packages under test, then the Items created will have an empty parent.nodeid (i.e. "::test_function").
This is because the _makeid() method in FSCollector compares the path of the Module to the rootdir:
The text was updated successfully, but these errors were encountered: