1 We set PYTHONPATH during testing.
3 --- coverage-7.6.5/tests/coveragetest.py.orig
4 +++ coverage-7.6.5/tests/coveragetest.py
7 def add_test_modules_to_pythonpath(self) -> None:
8 """Add our test modules directory to PYTHONPATH."""
9 - # Check that there isn't already a PYTHONPATH.
10 - assert os.getenv("PYTHONPATH") is None
11 testmods = nice_file(self.working_root(), "tests/modules")
12 zipfile = nice_file(self.working_root(), "tests/zipmods.zip")
13 - self.set_environ("PYTHONPATH", testmods + os.pathsep + zipfile)
14 + self.set_environ("PYTHONPATH", os.getenv("PYTHONPATH") + os.pathsep + testmods + os.pathsep + zipfile)
16 def working_root(self) -> str:
17 """Where is the root of the coverage.py working tree?"""
18 --- coverage-7.6.5/tests/test_testing.py.orig
19 +++ coverage-7.6.5/tests/test_testing.py
21 def test_xdist_sys_path_nuttiness_is_fixed() -> None:
22 # See conftest.py:fix_xdist_sys_path
23 assert sys.path[1] != ""
24 - assert os.getenv("PYTHONPATH") is None
27 def test_assert_count_equal() -> None: