pytest has issues with nodeid and symlinks #6941
Labels
topic: collection
related to the collection phase
topic: reporting
related to terminal output and user-facing messages and errors
type: bug
problem that needs to be addressed
I believe this is similar to #4321, but seeing as that was closed I thought I would open up a new issue with some of the details that I have gathered. I was able to reproduce this with both Python 2.7 with pytest 4.6.9 and Python 3.8.2 with pytest 5.4.1.
Here is the pip list for the Python 3 environment
Here is the pip list in the Python 2 environment
I am not sure you need the Python 2 information, but thought it might help to show that it existed in previous versions as well.
In both situations I used a docker container to run the test:
Here is what I did to reproduce the issue
mkdir /test_pytest
cd /root
ln -s /test_pytest test_pytest
pytest -sv /root/test_pytest/test_random.py
Output is as follows:
Notice how the nodeid is represented as
::test_thing::
. I believe this is incorrect, but maybe I am mistaken.I would think that it would at least be similar across different runs of the same test; however, running this in different directories produces different results.
For example:
Also shows the issue.
This does not though:
Also going into the directory itself also shows what I would expect the output to be:
Anyway I apologize if the information is jumbled, but wanted to try to capture as much info as possible.
Let me know if there is any other information you may need to help with this issue.
The text was updated successfully, but these errors were encountered: