diff --git a/changelog.d/+native-env-files-pythonpath.packaging.md b/changelog.d/+native-env-files-pythonpath.packaging.md new file mode 100644 index 0000000..83c4c0f --- /dev/null +++ b/changelog.d/+native-env-files-pythonpath.packaging.md @@ -0,0 +1 @@ +Keep `test_native_env_files_override_ini` passing when packagers run the suite with the plugin only on `PYTHONPATH`. diff --git a/tests/test_env.py b/tests/test_env.py index 3df9460..17d2b04 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -1168,6 +1168,7 @@ def test_env() -> None: { **system_env, **python_env, + "PYTHONPATH": os.pathsep.join(filter(None, (os.environ.get("PYTHONPATH"), python_env.get("PYTHONPATH")))), "PYTEST_DISABLE_PLUGIN_AUTOLOAD": "1", "PYTEST_PLUGINS": "pytest_env.plugin", },