Repository navigation
Propagate limited useful env. vars. in test_native_env_files_override_ini - #275
Conversation
This allows the test to work in environments where `PYTHONPATH` is needed to find the `pytest_env` plugin, such as downstream in Fedora.
This is useful for downstream testing where it may be desirable not to leave `.pyc` files lying around.
d5a6452 to
5aea2f9
Compare
Assert that Python import and bytecode settings reach the child process. Keep Windows system paths so a clean environment can start Python.
|
Hmm, the version of this that was actually merged and released in 1.8.2 doesn’t seem to work for me. I’m getting a bunch of failures from While building and testing the package in Fedora, I haven’t quite figured out what’s going wrong. |
|
Hmm, so it’s failing for and in those cases, Lines 809 to 816 in 75dca37 Testing the case where these environment aren’t propagated would seem to more or less defeat the original purpose of this PR, which was to run the package’s tests in environments where I guess I’ll explicitly skip the above parameterizations of |
In
test_native_env_files_override_ini, propagate two useful environment variable into the “clean” environment used for the subprocess to improve compatibility with downstream testing, e.g. in Fedora’spython-pytest-envpackage. KeepingPYTHONPATHallows the test to work in cases where thePYTHONPATHis needed for pytest to find thepytest_envplugin, andPYTHONDONTWRITEBYTECODEis useful when there’s a desire not to leave stray.pycfiles around.