Skip to content

Commit 11d3e52

Browse files
committed
Fix tests
1 parent 8715662 commit 11d3e52

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/test_no_code.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ class FilePair(NamedTuple):
2525
encoded: Path
2626

2727

28-
SRC_DIR = Path(__file__).parent.parent / "src"
28+
ROOT_DIR = Path(__file__).parent.parent
29+
SRC_DIR = ROOT_DIR / "src"
2930
TEST_CODE_DIR = Path(__file__).parent / "code"
3031
TEST_FILES = (
3132
FilePair(
@@ -45,9 +46,9 @@ class FilePair(NamedTuple):
4546
@pytest.fixture
4647
def install_pth_file() -> Generator[None, None, None]:
4748
"""Install the `no.pth` file in the site-packages directory to make the execute tests work."""
48-
src_pth_file = SRC_DIR / "no_code" / "no.pth"
49+
pth_file = ROOT_DIR / "purelib" / "no.pth"
4950
site_packages = sysconfig.get_path("purelib")
50-
shutil.copy(src_pth_file, Path(sys.prefix) / site_packages)
51+
shutil.copy(pth_file, Path(sys.prefix) / site_packages)
5152
installed_pth_file = Path(sys.prefix) / site_packages / "no.pth"
5253
assert installed_pth_file.exists()
5354
yield

0 commit comments

Comments
 (0)