@@ -145,7 +145,7 @@ def test_git_install_again_after_changes(script: PipTestEnvironment) -> None:
145
145
logged on the update: "Did not find branch or tag ..., assuming ref or
146
146
revision."
147
147
"""
148
- version_pkg_path = _create_test_package (script )
148
+ version_pkg_path = _create_test_package (script . scratch_path )
149
149
version = _install_version_pkg (script , version_pkg_path )
150
150
assert version == "0.1"
151
151
@@ -161,7 +161,7 @@ def test_git_install_branch_again_after_branch_changes(
161
161
Test installing a branch again after the branch is updated in the remote
162
162
repository.
163
163
"""
164
- version_pkg_path = _create_test_package (script )
164
+ version_pkg_path = _create_test_package (script . scratch_path )
165
165
version = _install_version_pkg (script , version_pkg_path , rev = "master" )
166
166
assert version == "0.1"
167
167
@@ -203,7 +203,7 @@ def test_git_with_sha1_revisions(script: PipTestEnvironment) -> None:
203
203
"""
204
204
Git backend should be able to install from SHA1 revisions
205
205
"""
206
- version_pkg_path = _create_test_package (script )
206
+ version_pkg_path = _create_test_package (script . scratch_path )
207
207
_change_test_package_version (script , version_pkg_path )
208
208
sha1 = script .run (
209
209
"git" ,
@@ -219,7 +219,7 @@ def test_git_with_short_sha1_revisions(script: PipTestEnvironment) -> None:
219
219
"""
220
220
Git backend should be able to install from SHA1 revisions
221
221
"""
222
- version_pkg_path = _create_test_package (script )
222
+ version_pkg_path = _create_test_package (script . scratch_path )
223
223
_change_test_package_version (script , version_pkg_path )
224
224
sha1 = script .run (
225
225
"git" ,
@@ -235,7 +235,7 @@ def test_git_with_branch_name_as_revision(script: PipTestEnvironment) -> None:
235
235
"""
236
236
Git backend should be able to install from branch names
237
237
"""
238
- version_pkg_path = _create_test_package (script )
238
+ version_pkg_path = _create_test_package (script . scratch_path )
239
239
branch = "test_branch"
240
240
script .run ("git" , "checkout" , "-b" , branch , cwd = version_pkg_path )
241
241
_change_test_package_version (script , version_pkg_path )
@@ -247,7 +247,7 @@ def test_git_with_tag_name_as_revision(script: PipTestEnvironment) -> None:
247
247
"""
248
248
Git backend should be able to install from tag names
249
249
"""
250
- version_pkg_path = _create_test_package (script )
250
+ version_pkg_path = _create_test_package (script . scratch_path )
251
251
script .run ("git" , "tag" , "test_tag" , cwd = version_pkg_path )
252
252
_change_test_package_version (script , version_pkg_path )
253
253
version = _install_version_pkg (script , version_pkg_path , rev = "test_tag" )
@@ -265,7 +265,7 @@ def test_git_install_ref(script: PipTestEnvironment) -> None:
265
265
"""
266
266
The Git backend should be able to install a ref with the first install.
267
267
"""
268
- version_pkg_path = _create_test_package (script )
268
+ version_pkg_path = _create_test_package (script . scratch_path )
269
269
_add_ref (script , version_pkg_path , "refs/foo/bar" )
270
270
_change_test_package_version (script , version_pkg_path )
271
271
@@ -282,7 +282,7 @@ def test_git_install_then_install_ref(script: PipTestEnvironment) -> None:
282
282
The Git backend should be able to install a ref after a package has
283
283
already been installed.
284
284
"""
285
- version_pkg_path = _create_test_package (script )
285
+ version_pkg_path = _create_test_package (script . scratch_path )
286
286
_add_ref (script , version_pkg_path , "refs/foo/bar" )
287
287
_change_test_package_version (script , version_pkg_path )
288
288
@@ -431,7 +431,7 @@ def test_git_with_ambiguous_revs(script: PipTestEnvironment) -> None:
431
431
"""
432
432
Test git with two "names" (tag/branch) pointing to the same commit
433
433
"""
434
- version_pkg_path = _create_test_package (script )
434
+ version_pkg_path = _create_test_package (script . scratch_path )
435
435
version_pkg_url = _make_version_pkg_url (version_pkg_path , rev = "0.1" )
436
436
script .run ("git" , "tag" , "0.1" , cwd = version_pkg_path )
437
437
result = script .pip ("install" , "-e" , version_pkg_url )
@@ -445,7 +445,7 @@ def test_editable__no_revision(script: PipTestEnvironment) -> None:
445
445
"""
446
446
Test a basic install in editable mode specifying no revision.
447
447
"""
448
- version_pkg_path = _create_test_package (script )
448
+ version_pkg_path = _create_test_package (script . scratch_path )
449
449
_install_version_pkg_only (script , version_pkg_path )
450
450
451
451
branch = _get_editable_branch (script , "version-pkg" )
@@ -460,7 +460,7 @@ def test_editable__branch_with_sha_same_as_default(script: PipTestEnvironment) -
460
460
Test installing in editable mode a branch whose sha matches the sha
461
461
of the default branch, but is different from the default branch.
462
462
"""
463
- version_pkg_path = _create_test_package (script )
463
+ version_pkg_path = _create_test_package (script . scratch_path )
464
464
# Create a second branch with the same SHA.
465
465
script .run ("git" , "branch" , "develop" , cwd = version_pkg_path )
466
466
_install_version_pkg_only (script , version_pkg_path , rev = "develop" )
@@ -479,7 +479,7 @@ def test_editable__branch_with_sha_different_from_default(
479
479
Test installing in editable mode a branch whose sha is different from
480
480
the sha of the default branch.
481
481
"""
482
- version_pkg_path = _create_test_package (script )
482
+ version_pkg_path = _create_test_package (script . scratch_path )
483
483
# Create a second branch.
484
484
script .run ("git" , "branch" , "develop" , cwd = version_pkg_path )
485
485
# Add another commit to the master branch to give it a different sha.
@@ -500,7 +500,7 @@ def test_editable__non_master_default_branch(script: PipTestEnvironment) -> None
500
500
Test the branch you get after an editable install from a remote repo
501
501
with a non-master default branch.
502
502
"""
503
- version_pkg_path = _create_test_package (script )
503
+ version_pkg_path = _create_test_package (script . scratch_path )
504
504
# Change the default branch of the remote repo to a name that is
505
505
# alphabetically after "master".
506
506
script .run ("git" , "checkout" , "-b" , "release" , cwd = version_pkg_path )
@@ -517,7 +517,7 @@ def test_reinstalling_works_with_editable_non_master_branch(
517
517
Reinstalling an editable installation should not assume that the "master"
518
518
branch exists. See https://github.com/pypa/pip/issues/4448.
519
519
"""
520
- version_pkg_path = _create_test_package (script )
520
+ version_pkg_path = _create_test_package (script . scratch_path )
521
521
522
522
# Switch the default branch to something other than 'master'
523
523
script .run ("git" , "branch" , "-m" , "foobar" , cwd = version_pkg_path )
@@ -569,7 +569,7 @@ def test_install_git_branch_not_cached(script: PipTestEnvironment) -> None:
569
569
Installing git urls with a branch revision does not cause wheel caching.
570
570
"""
571
571
PKG = "gitbranchnotcached"
572
- repo_dir = _create_test_package (script , name = PKG )
572
+ repo_dir = _create_test_package (script . scratch_path , name = PKG )
573
573
url = _make_version_pkg_url (repo_dir , rev = "master" , name = PKG )
574
574
result = script .pip ("install" , url , "--only-binary=:all:" )
575
575
assert f"Successfully built { PKG } " in result .stdout , result .stdout
@@ -585,7 +585,7 @@ def test_install_git_sha_cached(script: PipTestEnvironment) -> None:
585
585
Installing git urls with a sha revision does cause wheel caching.
586
586
"""
587
587
PKG = "gitshacached"
588
- repo_dir = _create_test_package (script , name = PKG )
588
+ repo_dir = _create_test_package (script . scratch_path , name = PKG )
589
589
commit = script .run ("git" , "rev-parse" , "HEAD" , cwd = repo_dir ).stdout .strip ()
590
590
url = _make_version_pkg_url (repo_dir , rev = commit , name = PKG )
591
591
result = script .pip ("install" , url )
0 commit comments