When PYTHONPATH exists, extending it preserves the existing values.
(self)
| 112 | assert env["PYTHONPATH"] == os.pathsep.join(additional_paths) |
| 113 | |
| 114 | def test_extend_path_existing_pythonpath(self): |
| 115 | """When PYTHONPATH exists, extending it preserves the existing values.""" |
| 116 | env = {"PYTHONPATH": "hello"} |
| 117 | |
| 118 | extend_python_path(env, ["test", ".pth"]) |
| 119 | assert env["PYTHONPATH"] == os.pathsep.join(["hello", "test", ".pth"]) |
| 120 | |
| 121 | @pytest.mark.parametrize("extra_path", [ |
| 122 | None, |
nothing calls this directly
no test coverage detected