def test_extend_path_existing_pythonpath(self): """When PYTHONPATH exists, extending it preserves the existing values.""" env = {"PYTHONPATH": "hello"} extend_python_path(env, ["test", ".pth"]) assert env["PYTHONPATH"] == os.pathsep.join(["hello", "test", ".pth"])
def test_extend_path(self, additional_paths): env = {} extend_python_path(env, additional_paths) assert env["PYTHONPATH"] == os.pathsep.join(additional_paths)