Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Running pytest with "--pyargs" will result in Items with empty "parent.nodeid" if run from a different root directory #2775
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: