Open mrbean-bremen opened 16 hours ago
I have seen a somewhat similar behavior with #1086, but labeled it as a limitation due to another context. But if that happens with such a basic test, it is certainly a bug, at least as far as I can see now.
I did not really understand the cause of the problem (it has to do with the virtual environment and the Python path, but I was not able to find a good solution to prevent this).
An easy workaround to fix this is to use python -m pytest
instead of calling pytest
directly. This is generally considered good practice, but the direct call should also work. I cannot promise a timely fix, as I already have been struggling with this without success, but I will see what I can do.
Yes, running it as python -m pytest
works for me with both 3.12 and 3.13.
Discussed in https://github.com/pytest-dev/pyfakefs/discussions/1095