@@ -222,8 +222,9 @@ def test_pep518_forkbombs(script, data, common_wheels, command, package):
222
222
223
223
224
224
@pytest .mark .network
225
+ @pytest .mark .usefixtures ("with_wheel" )
225
226
def test_pip_second_command_line_interface_works (
226
- script , pip_src , data , common_wheels , deprecated_python , with_wheel
227
+ script , pip_src , data , common_wheels , deprecated_python
227
228
):
228
229
"""
229
230
Check if ``pip<PYVERSION>`` commands behaves equally
@@ -258,7 +259,8 @@ def test_install_exit_status_code_when_blank_requirements_file(script):
258
259
259
260
260
261
@pytest .mark .network
261
- def test_basic_install_from_pypi (script , with_wheel ):
262
+ @pytest .mark .usefixtures ("with_wheel" )
263
+ def test_basic_install_from_pypi (script ):
262
264
"""
263
265
Test installing a package from PyPI.
264
266
"""
@@ -316,7 +318,8 @@ def test_basic_install_editable_from_git(script):
316
318
_test_install_editable_from_git (script )
317
319
318
320
319
- def test_install_editable_from_git_autobuild_wheel (script , with_wheel ):
321
+ @pytest .mark .usefixtures ("with_wheel" )
322
+ def test_install_editable_from_git_autobuild_wheel (script ):
320
323
_test_install_editable_from_git (script )
321
324
322
325
@@ -434,7 +437,8 @@ def test_vcs_url_urlquote_normalization(script, tmpdir):
434
437
435
438
436
439
@pytest .mark .parametrize ("resolver" , ["" , "--use-deprecated=legacy-resolver" ])
437
- def test_basic_install_from_local_directory (script , data , resolver , with_wheel ):
440
+ @pytest .mark .usefixtures ("with_wheel" )
441
+ def test_basic_install_from_local_directory (script , data , resolver ):
438
442
"""
439
443
Test installing from a local directory.
440
444
"""
@@ -461,9 +465,8 @@ def test_basic_install_from_local_directory(script, data, resolver, with_wheel):
461
465
("embedded_rel_path" , True ),
462
466
],
463
467
)
464
- def test_basic_install_relative_directory (
465
- script , data , test_type , editable , with_wheel
466
- ):
468
+ @pytest .mark .usefixtures ("with_wheel" )
469
+ def test_basic_install_relative_directory (script , data , test_type , editable ):
467
470
"""
468
471
Test installing a requirement using a relative path.
469
472
"""
@@ -578,9 +581,8 @@ def test_hashed_install_failure_later_flag(script, tmpdir):
578
581
)
579
582
580
583
581
- def test_install_from_local_directory_with_symlinks_to_directories (
582
- script , data , with_wheel
583
- ):
584
+ @pytest .mark .usefixtures ("with_wheel" )
585
+ def test_install_from_local_directory_with_symlinks_to_directories (script , data ):
584
586
"""
585
587
Test installing from a local directory containing symlinks to directories.
586
588
"""
@@ -592,7 +594,8 @@ def test_install_from_local_directory_with_symlinks_to_directories(
592
594
result .did_create (dist_info_folder )
593
595
594
596
595
- def test_install_from_local_directory_with_in_tree_build (script , data , with_wheel ):
597
+ @pytest .mark .usefixtures ("with_wheel" )
598
+ def test_install_from_local_directory_with_in_tree_build (script , data ):
596
599
"""
597
600
Test installing from a local directory with --use-feature=in-tree-build.
598
601
"""
@@ -610,9 +613,8 @@ def test_install_from_local_directory_with_in_tree_build(script, data, with_whee
610
613
611
614
612
615
@pytest .mark .skipif ("sys.platform == 'win32'" )
613
- def test_install_from_local_directory_with_socket_file (
614
- script , data , tmpdir , with_wheel
615
- ):
616
+ @pytest .mark .usefixtures ("with_wheel" )
617
+ def test_install_from_local_directory_with_socket_file (script , data , tmpdir ):
616
618
"""
617
619
Test installing from a local directory containing a socket file.
618
620
"""
@@ -689,7 +691,8 @@ def test_upgrade_argparse_shadowed(script):
689
691
assert "Not uninstalling argparse" not in result .stdout
690
692
691
693
692
- def test_install_curdir (script , data , with_wheel ):
694
+ @pytest .mark .usefixtures ("with_wheel" )
695
+ def test_install_curdir (script , data ):
693
696
"""
694
697
Test installing current directory ('.').
695
698
"""
@@ -705,7 +708,8 @@ def test_install_curdir(script, data, with_wheel):
705
708
result .did_create (dist_info_folder )
706
709
707
710
708
- def test_install_pardir (script , data , with_wheel ):
711
+ @pytest .mark .usefixtures ("with_wheel" )
712
+ def test_install_pardir (script , data ):
709
713
"""
710
714
Test installing parent directory ('..').
711
715
"""
@@ -780,7 +784,8 @@ def test_install_global_option_using_editable(script, tmpdir):
780
784
781
785
782
786
@pytest .mark .network
783
- def test_install_package_with_same_name_in_curdir (script , with_wheel ):
787
+ @pytest .mark .usefixtures ("with_wheel" )
788
+ def test_install_package_with_same_name_in_curdir (script ):
784
789
"""
785
790
Test installing a package with the same name of a local folder
786
791
"""
@@ -798,7 +803,8 @@ def test_install_package_with_same_name_in_curdir(script, with_wheel):
798
803
)
799
804
800
805
801
- def test_install_folder_using_dot_slash (script , with_wheel ):
806
+ @pytest .mark .usefixtures ("with_wheel" )
807
+ def test_install_folder_using_dot_slash (script ):
802
808
"""
803
809
Test installing a folder using pip install ./foldername
804
810
"""
@@ -810,7 +816,8 @@ def test_install_folder_using_dot_slash(script, with_wheel):
810
816
result .did_create (dist_info_folder )
811
817
812
818
813
- def test_install_folder_using_slash_in_the_end (script , with_wheel ):
819
+ @pytest .mark .usefixtures ("with_wheel" )
820
+ def test_install_folder_using_slash_in_the_end (script ):
814
821
r"""
815
822
Test installing a folder using pip install foldername/ or foldername\
816
823
"""
@@ -822,7 +829,8 @@ def test_install_folder_using_slash_in_the_end(script, with_wheel):
822
829
result .did_create (dist_info_folder )
823
830
824
831
825
- def test_install_folder_using_relative_path (script , with_wheel ):
832
+ @pytest .mark .usefixtures ("with_wheel" )
833
+ def test_install_folder_using_relative_path (script ):
826
834
"""
827
835
Test installing a folder using pip install folder1/folder2
828
836
"""
@@ -836,7 +844,8 @@ def test_install_folder_using_relative_path(script, with_wheel):
836
844
837
845
838
846
@pytest .mark .network
839
- def test_install_package_which_contains_dev_in_name (script , with_wheel ):
847
+ @pytest .mark .usefixtures ("with_wheel" )
848
+ def test_install_package_which_contains_dev_in_name (script ):
840
849
"""
841
850
Test installing package from PyPI which contains 'dev' in name
842
851
"""
@@ -847,7 +856,8 @@ def test_install_package_which_contains_dev_in_name(script, with_wheel):
847
856
result .did_create (dist_info_folder )
848
857
849
858
850
- def test_install_package_with_target (script , with_wheel ):
859
+ @pytest .mark .usefixtures ("with_wheel" )
860
+ def test_install_package_with_target (script ):
851
861
"""
852
862
Test installing a package using pip install --target
853
863
"""
@@ -975,7 +985,8 @@ def test_install_nonlocal_compatible_wheel_path(
975
985
976
986
977
987
@pytest .mark .parametrize ("opt" , ("--target" , "--prefix" ))
978
- def test_install_with_target_or_prefix_and_scripts_no_warning (opt , script , with_wheel ):
988
+ @pytest .mark .usefixtures ("with_wheel" )
989
+ def test_install_with_target_or_prefix_and_scripts_no_warning (opt , script ):
979
990
"""
980
991
Test that installing with --target does not trigger the "script not
981
992
in PATH" warning (issue #5201)
@@ -1011,7 +1022,8 @@ def main(): pass
1011
1022
assert "--no-warn-script-location" not in result .stderr , str (result )
1012
1023
1013
1024
1014
- def test_install_package_with_root (script , data , with_wheel ):
1025
+ @pytest .mark .usefixtures ("with_wheel" )
1026
+ def test_install_package_with_root (script , data ):
1015
1027
"""
1016
1028
Test installing a package using pip install --root
1017
1029
"""
@@ -1194,7 +1206,8 @@ def test_install_package_with_latin1_setup(script, data):
1194
1206
script .pip ("install" , to_install )
1195
1207
1196
1208
1197
- def test_url_req_case_mismatch_no_index (script , data , with_wheel ):
1209
+ @pytest .mark .usefixtures ("with_wheel" )
1210
+ def test_url_req_case_mismatch_no_index (script , data ):
1198
1211
"""
1199
1212
tar ball url requirements (with no egg fragment), that happen to have upper
1200
1213
case project names, should be considered equal to later requirements that
@@ -1215,7 +1228,8 @@ def test_url_req_case_mismatch_no_index(script, data, with_wheel):
1215
1228
result .did_not_create (dist_info_folder )
1216
1229
1217
1230
1218
- def test_url_req_case_mismatch_file_index (script , data , with_wheel ):
1231
+ @pytest .mark .usefixtures ("with_wheel" )
1232
+ def test_url_req_case_mismatch_file_index (script , data ):
1219
1233
"""
1220
1234
tar ball url requirements (with no egg fragment), that happen to have upper
1221
1235
case project names, should be considered equal to later requirements that
@@ -1242,7 +1256,8 @@ def test_url_req_case_mismatch_file_index(script, data, with_wheel):
1242
1256
result .did_not_create (dist_info_folder )
1243
1257
1244
1258
1245
- def test_url_incorrect_case_no_index (script , data , with_wheel ):
1259
+ @pytest .mark .usefixtures ("with_wheel" )
1260
+ def test_url_incorrect_case_no_index (script , data ):
1246
1261
"""
1247
1262
Same as test_url_req_case_mismatch_no_index, except testing for the case
1248
1263
where the incorrect case is given in the name of the package to install
@@ -1263,7 +1278,8 @@ def test_url_incorrect_case_no_index(script, data, with_wheel):
1263
1278
result .did_create (dist_info_folder )
1264
1279
1265
1280
1266
- def test_url_incorrect_case_file_index (script , data , with_wheel ):
1281
+ @pytest .mark .usefixtures ("with_wheel" )
1282
+ def test_url_incorrect_case_file_index (script , data ):
1267
1283
"""
1268
1284
Same as test_url_req_case_mismatch_file_index, except testing for the case
1269
1285
where the incorrect case is given in the name of the package to install
@@ -1408,12 +1424,14 @@ def test_install_topological_sort(script, data):
1408
1424
assert order1 in res or order2 in res , res
1409
1425
1410
1426
1411
- def test_install_wheel_broken (script , with_wheel ):
1427
+ @pytest .mark .usefixtures ("with_wheel" )
1428
+ def test_install_wheel_broken (script ):
1412
1429
res = script .pip_install_local ("wheelbroken" , expect_stderr = True )
1413
1430
assert "Successfully installed wheelbroken-0.1" in str (res ), str (res )
1414
1431
1415
1432
1416
- def test_cleanup_after_failed_wheel (script , with_wheel ):
1433
+ @pytest .mark .usefixtures ("with_wheel" )
1434
+ def test_cleanup_after_failed_wheel (script ):
1417
1435
res = script .pip_install_local ("wheelbrokenafter" , expect_stderr = True )
1418
1436
# One of the effects of not cleaning up is broken scripts:
1419
1437
script_py = script .bin_path / "script.py"
@@ -1426,7 +1444,8 @@ def test_cleanup_after_failed_wheel(script, with_wheel):
1426
1444
assert "Running setup.py clean for wheelbrokenafter" in str (res ), str (res )
1427
1445
1428
1446
1429
- def test_install_builds_wheels (script , data , with_wheel ):
1447
+ @pytest .mark .usefixtures ("with_wheel" )
1448
+ def test_install_builds_wheels (script , data ):
1430
1449
# We need to use a subprocess to get the right value on Windows.
1431
1450
res = script .run (
1432
1451
"python" ,
@@ -1473,7 +1492,8 @@ def test_install_builds_wheels(script, data, with_wheel):
1473
1492
]
1474
1493
1475
1494
1476
- def test_install_no_binary_disables_building_wheels (script , data , with_wheel ):
1495
+ @pytest .mark .usefixtures ("with_wheel" )
1496
+ def test_install_no_binary_disables_building_wheels (script , data ):
1477
1497
to_install = data .packages .joinpath ("requires_wheelbroken_upper" )
1478
1498
res = script .pip (
1479
1499
"install" ,
@@ -1504,7 +1524,8 @@ def test_install_no_binary_disables_building_wheels(script, data, with_wheel):
1504
1524
1505
1525
1506
1526
@pytest .mark .network
1507
- def test_install_no_binary_builds_pep_517_wheel (script , data , with_wheel ):
1527
+ @pytest .mark .usefixtures ("with_wheel" )
1528
+ def test_install_no_binary_builds_pep_517_wheel (script , data ):
1508
1529
to_install = data .packages .joinpath ("pep517_setup_and_pyproject" )
1509
1530
res = script .pip ("install" , "--no-binary=:all:" , "-f" , data .find_links , to_install )
1510
1531
expected = "Successfully installed pep517-setup-and-pyproject"
@@ -1516,7 +1537,8 @@ def test_install_no_binary_builds_pep_517_wheel(script, data, with_wheel):
1516
1537
1517
1538
1518
1539
@pytest .mark .network
1519
- def test_install_no_binary_uses_local_backend (script , data , with_wheel , tmpdir ):
1540
+ @pytest .mark .usefixtures ("with_wheel" )
1541
+ def test_install_no_binary_uses_local_backend (script , data , tmpdir ):
1520
1542
to_install = data .packages .joinpath ("pep517_wrapper_buildsys" )
1521
1543
script .environ ["PIP_TEST_MARKER_FILE" ] = marker = str (tmpdir / "marker" )
1522
1544
res = script .pip ("install" , "--no-binary=:all:" , "-f" , data .find_links , to_install )
@@ -1527,7 +1549,8 @@ def test_install_no_binary_uses_local_backend(script, data, with_wheel, tmpdir):
1527
1549
assert os .path .isfile (marker ), "Local PEP 517 backend not used"
1528
1550
1529
1551
1530
- def test_install_no_binary_disables_cached_wheels (script , data , with_wheel ):
1552
+ @pytest .mark .usefixtures ("with_wheel" )
1553
+ def test_install_no_binary_disables_cached_wheels (script , data ):
1531
1554
# Seed the cache
1532
1555
script .pip ("install" , "--no-index" , "-f" , data .find_links , "upper" )
1533
1556
script .pip ("uninstall" , "upper" , "-y" )
@@ -1659,7 +1682,8 @@ def test_install_incompatible_python_requires_editable(script):
1659
1682
assert _get_expected_error_text () in result .stderr , str (result )
1660
1683
1661
1684
1662
- def test_install_incompatible_python_requires_wheel (script , with_wheel ):
1685
+ @pytest .mark .usefixtures ("with_wheel" )
1686
+ def test_install_incompatible_python_requires_wheel (script ):
1663
1687
script .scratch_path .joinpath ("pkga" ).mkdir ()
1664
1688
pkga_path = script .scratch_path / "pkga"
1665
1689
pkga_path .joinpath ("setup.py" ).write_text (
0 commit comments