Skip to content

Commit 873fdf7

Browse files
authored
tests: Use script.scratch_path over script.temp_path (#13272)
script.temp_path is the system temporary directory. scripttest will check that there aren't any dangling files left in there, thus it's inappropriate to write long-lived packages there. These tests are currently passing as scripttest's temporary file detection logic is broken. However, a newer version of scripttest will fail.
1 parent c757d52 commit 873fdf7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/functional/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test_entrypoints_work(entrypoint: str, script: PipTestEnvironment) -> None:
2424
if script.zipapp:
2525
pytest.skip("Zipapp does not include entrypoints")
2626

27-
fake_pkg = script.temp_path / "fake_pkg"
27+
fake_pkg = script.scratch_path / "fake_pkg"
2828
fake_pkg.mkdir()
2929
fake_pkg.joinpath("setup.py").write_text(
3030
dedent(

tests/functional/test_pep517.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def test_pep517_backend_requirements_satisfied_by_prerelease(
252252
script.pip("install", "test_backend", "--no-index", "-f", data.backends)
253253

254254
project_dir = make_project(
255-
script.temp_path,
255+
script.scratch_path,
256256
requires=["test_backend", "myreq"],
257257
backend="test_backend",
258258
)

0 commit comments

Comments
 (0)