Skip to content

Commit 3fd8fde

Browse files
sbidoulpradyunsg
authored andcommitted
Remove with_wheel fixture
We install wheel by default in our test env.
1 parent b31a308 commit 3fd8fde

18 files changed

+2
-96
lines changed

tests/conftest.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,6 @@ def virtualenv(
503503
yield virtualenv_factory(tmpdir.joinpath("workspace", "venv"))
504504

505505

506-
@pytest.fixture
507-
def with_wheel(virtualenv: VirtualEnvironment, wheel_install: Path) -> None:
508-
pass
509-
510-
511506
class ScriptFactory(Protocol):
512507
def __call__(
513508
self,

tests/functional/test_download.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,6 @@ def make_wheel_with_python_requires(
659659
return package_dir / "dist" / file_name
660660

661661

662-
@pytest.mark.usefixtures("with_wheel")
663662
def test_download__python_version_used_for_python_requires(
664663
script: PipTestEnvironment, data: TestData
665664
) -> None:
@@ -700,7 +699,6 @@ def make_args(python_version: str) -> List[str]:
700699
script.pip(*args) # no exception
701700

702701

703-
@pytest.mark.usefixtures("with_wheel")
704702
def test_download_ignore_requires_python_dont_fail_with_wrong_python(
705703
script: PipTestEnvironment,
706704
) -> None:

tests/functional/test_freeze.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def test_exclude_and_normalization(script: PipTestEnvironment, tmpdir: Path) ->
104104
assert "Normalizable_Name" not in result.stdout
105105

106106

107-
@pytest.mark.usefixtures("with_wheel")
108107
def test_freeze_multiple_exclude_with_all(script: PipTestEnvironment) -> None:
109108
result = script.pip("freeze", "--all")
110109
assert "pip==" in result.stdout
@@ -962,7 +961,6 @@ def test_freeze_path_multiple(
962961
_check_output(result.stdout, expected)
963962

964963

965-
@pytest.mark.usefixtures("with_wheel")
966964
def test_freeze_direct_url_archive(
967965
script: PipTestEnvironment, shared_data: TestData
968966
) -> None:
@@ -1005,7 +1003,6 @@ def test_freeze_include_work_dir_pkg(script: PipTestEnvironment) -> None:
10051003
assert "simple==1.0" in result.stdout
10061004

10071005

1008-
@pytest.mark.usefixtures("with_wheel")
10091006
def test_freeze_pep610_editable(script: PipTestEnvironment) -> None:
10101007
"""
10111008
Test that a package installed with a direct_url.json with editable=true

tests/functional/test_install.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ def test_pep518_forkbombs(
272272

273273

274274
@pytest.mark.network
275-
@pytest.mark.usefixtures("with_wheel")
276275
def test_pip_second_command_line_interface_works(
277276
script: PipTestEnvironment,
278277
pip_src: Path,
@@ -317,7 +316,6 @@ def test_install_exit_status_code_when_blank_requirements_file(
317316

318317

319318
@pytest.mark.network
320-
@pytest.mark.usefixtures("with_wheel")
321319
def test_basic_install_from_pypi(script: PipTestEnvironment) -> None:
322320
"""
323321
Test installing a package from PyPI.
@@ -376,7 +374,6 @@ def test_basic_install_editable_from_git(script: PipTestEnvironment) -> None:
376374
_test_install_editable_from_git(script)
377375

378376

379-
@pytest.mark.usefixtures("with_wheel")
380377
def test_install_editable_from_git_autobuild_wheel(script: PipTestEnvironment) -> None:
381378
_test_install_editable_from_git(script)
382379

@@ -503,7 +500,6 @@ def test_vcs_url_urlquote_normalization(
503500

504501

505502
@pytest.mark.parametrize("resolver", ["", "--use-deprecated=legacy-resolver"])
506-
@pytest.mark.usefixtures("with_wheel")
507503
def test_basic_install_from_local_directory(
508504
script: PipTestEnvironment, data: TestData, resolver: str
509505
) -> None:
@@ -533,7 +529,6 @@ def test_basic_install_from_local_directory(
533529
("embedded_rel_path", True),
534530
],
535531
)
536-
@pytest.mark.usefixtures("with_wheel")
537532
def test_basic_install_relative_directory(
538533
script: PipTestEnvironment, data: TestData, test_type: str, editable: bool
539534
) -> None:
@@ -655,7 +650,6 @@ def test_hashed_install_failure_later_flag(
655650
)
656651

657652

658-
@pytest.mark.usefixtures("with_wheel")
659653
def test_install_from_local_directory_with_in_tree_build(
660654
script: PipTestEnvironment, data: TestData
661655
) -> None:
@@ -800,7 +794,6 @@ def test_upgrade_argparse_shadowed(script: PipTestEnvironment) -> None:
800794
assert "Not uninstalling argparse" not in result.stdout
801795

802796

803-
@pytest.mark.usefixtures("with_wheel")
804797
def test_install_curdir(script: PipTestEnvironment, data: TestData) -> None:
805798
"""
806799
Test installing current directory ('.').
@@ -817,7 +810,6 @@ def test_install_curdir(script: PipTestEnvironment, data: TestData) -> None:
817810
result.did_create(dist_info_folder)
818811

819812

820-
@pytest.mark.usefixtures("with_wheel")
821813
def test_install_pardir(script: PipTestEnvironment, data: TestData) -> None:
822814
"""
823815
Test installing parent directory ('..').
@@ -877,7 +869,6 @@ def test_install_global_option_using_editable(
877869

878870

879871
@pytest.mark.network
880-
@pytest.mark.usefixtures("with_wheel")
881872
def test_install_package_with_same_name_in_curdir(script: PipTestEnvironment) -> None:
882873
"""
883874
Test installing a package with the same name of a local folder
@@ -896,7 +887,6 @@ def test_install_package_with_same_name_in_curdir(script: PipTestEnvironment) ->
896887
)
897888

898889

899-
@pytest.mark.usefixtures("with_wheel")
900890
def test_install_folder_using_dot_slash(script: PipTestEnvironment) -> None:
901891
"""
902892
Test installing a folder using pip install ./foldername
@@ -909,7 +899,6 @@ def test_install_folder_using_dot_slash(script: PipTestEnvironment) -> None:
909899
result.did_create(dist_info_folder)
910900

911901

912-
@pytest.mark.usefixtures("with_wheel")
913902
def test_install_folder_using_slash_in_the_end(script: PipTestEnvironment) -> None:
914903
r"""
915904
Test installing a folder using pip install foldername/ or foldername\
@@ -922,7 +911,6 @@ def test_install_folder_using_slash_in_the_end(script: PipTestEnvironment) -> No
922911
result.did_create(dist_info_folder)
923912

924913

925-
@pytest.mark.usefixtures("with_wheel")
926914
def test_install_folder_using_relative_path(script: PipTestEnvironment) -> None:
927915
"""
928916
Test installing a folder using pip install folder1/folder2
@@ -937,7 +925,6 @@ def test_install_folder_using_relative_path(script: PipTestEnvironment) -> None:
937925

938926

939927
@pytest.mark.network
940-
@pytest.mark.usefixtures("with_wheel")
941928
def test_install_package_which_contains_dev_in_name(script: PipTestEnvironment) -> None:
942929
"""
943930
Test installing package from PyPI which contains 'dev' in name
@@ -949,7 +936,6 @@ def test_install_package_which_contains_dev_in_name(script: PipTestEnvironment)
949936
result.did_create(dist_info_folder)
950937

951938

952-
@pytest.mark.usefixtures("with_wheel")
953939
def test_install_package_with_target(script: PipTestEnvironment) -> None:
954940
"""
955941
Test installing a package using pip install --target
@@ -1082,7 +1068,6 @@ def test_install_nonlocal_compatible_wheel_path(
10821068

10831069

10841070
@pytest.mark.parametrize("opt", ("--target", "--prefix"))
1085-
@pytest.mark.usefixtures("with_wheel")
10861071
def test_install_with_target_or_prefix_and_scripts_no_warning(
10871072
opt: str, script: PipTestEnvironment
10881073
) -> None:
@@ -1121,7 +1106,6 @@ def main(): pass
11211106
assert "--no-warn-script-location" not in result.stderr, str(result)
11221107

11231108

1124-
@pytest.mark.usefixtures("with_wheel")
11251109
def test_install_package_with_root(script: PipTestEnvironment, data: TestData) -> None:
11261110
"""
11271111
Test installing a package using pip install --root
@@ -1318,7 +1302,6 @@ def test_install_package_with_latin1_setup(
13181302
script.pip("install", to_install)
13191303

13201304

1321-
@pytest.mark.usefixtures("with_wheel")
13221305
def test_url_req_case_mismatch_no_index(
13231306
script: PipTestEnvironment, data: TestData
13241307
) -> None:
@@ -1342,7 +1325,6 @@ def test_url_req_case_mismatch_no_index(
13421325
result.did_not_create(dist_info_folder)
13431326

13441327

1345-
@pytest.mark.usefixtures("with_wheel")
13461328
def test_url_req_case_mismatch_file_index(
13471329
script: PipTestEnvironment, data: TestData
13481330
) -> None:
@@ -1372,7 +1354,6 @@ def test_url_req_case_mismatch_file_index(
13721354
result.did_not_create(dist_info_folder)
13731355

13741356

1375-
@pytest.mark.usefixtures("with_wheel")
13761357
def test_url_incorrect_case_no_index(
13771358
script: PipTestEnvironment, data: TestData
13781359
) -> None:
@@ -1396,7 +1377,6 @@ def test_url_incorrect_case_no_index(
13961377
result.did_create(dist_info_folder)
13971378

13981379

1399-
@pytest.mark.usefixtures("with_wheel")
14001380
def test_url_incorrect_case_file_index(
14011381
script: PipTestEnvironment, data: TestData
14021382
) -> None:
@@ -1546,15 +1526,13 @@ def test_install_topological_sort(script: PipTestEnvironment, data: TestData) ->
15461526
assert order1 in res or order2 in res, res
15471527

15481528

1549-
@pytest.mark.usefixtures("with_wheel")
15501529
def test_install_wheel_broken(script: PipTestEnvironment) -> None:
15511530
res = script.pip_install_local("wheelbroken", allow_stderr_error=True)
15521531
assert "ERROR: Failed building wheel for wheelbroken" in res.stderr
15531532
# Fallback to setup.py install (https://github.com/pypa/pip/issues/8368)
15541533
assert "Successfully installed wheelbroken-0.1" in str(res), str(res)
15551534

15561535

1557-
@pytest.mark.usefixtures("with_wheel")
15581536
def test_cleanup_after_failed_wheel(script: PipTestEnvironment) -> None:
15591537
res = script.pip_install_local("wheelbrokenafter", allow_stderr_error=True)
15601538
assert "ERROR: Failed building wheel for wheelbrokenafter" in res.stderr
@@ -1569,7 +1547,6 @@ def test_cleanup_after_failed_wheel(script: PipTestEnvironment) -> None:
15691547
assert "Running setup.py clean for wheelbrokenafter" in str(res), str(res)
15701548

15711549

1572-
@pytest.mark.usefixtures("with_wheel")
15731550
def test_install_builds_wheels(script: PipTestEnvironment, data: TestData) -> None:
15741551
# We need to use a subprocess to get the right value on Windows.
15751552
res = script.run(
@@ -1622,7 +1599,6 @@ def test_install_builds_wheels(script: PipTestEnvironment, data: TestData) -> No
16221599
]
16231600

16241601

1625-
@pytest.mark.usefixtures("with_wheel")
16261602
def test_install_no_binary_disables_building_wheels(
16271603
script: PipTestEnvironment, data: TestData
16281604
) -> None:
@@ -1653,7 +1629,6 @@ def test_install_no_binary_disables_building_wheels(
16531629

16541630

16551631
@pytest.mark.network
1656-
@pytest.mark.usefixtures("with_wheel")
16571632
def test_install_no_binary_builds_pep_517_wheel(
16581633
script: PipTestEnvironment, data: TestData
16591634
) -> None:
@@ -1668,7 +1643,6 @@ def test_install_no_binary_builds_pep_517_wheel(
16681643

16691644

16701645
@pytest.mark.network
1671-
@pytest.mark.usefixtures("with_wheel")
16721646
def test_install_no_binary_uses_local_backend(
16731647
script: PipTestEnvironment, data: TestData, tmpdir: Path
16741648
) -> None:
@@ -1682,7 +1656,6 @@ def test_install_no_binary_uses_local_backend(
16821656
assert os.path.isfile(marker), "Local PEP 517 backend not used"
16831657

16841658

1685-
@pytest.mark.usefixtures("with_wheel")
16861659
def test_install_no_binary_disables_cached_wheels(
16871660
script: PipTestEnvironment, data: TestData
16881661
) -> None:
@@ -1821,7 +1794,6 @@ def test_install_incompatible_python_requires_editable(
18211794
assert _get_expected_error_text() in result.stderr, str(result)
18221795

18231796

1824-
@pytest.mark.usefixtures("with_wheel")
18251797
def test_install_incompatible_python_requires_wheel(script: PipTestEnvironment) -> None:
18261798
script.scratch_path.joinpath("pkga").mkdir()
18271799
pkga_path = script.scratch_path / "pkga"

tests/functional/test_install_cleanup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def test_no_clean_option_blocks_cleaning_after_install(
3131

3232

3333
@pytest.mark.network
34-
@pytest.mark.usefixtures("with_wheel")
3534
def test_pep517_no_legacy_cleanup(script: PipTestEnvironment, data: TestData) -> None:
3635
"""Test a PEP 517 failed build does not attempt a legacy cleanup"""
3736
to_install = data.packages.joinpath("pep517_wrapper_buildsys")

tests/functional/test_install_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ def test_options_from_venv_config(
245245
assert msg.lower() in result.stdout.lower(), str(result)
246246

247247

248-
@pytest.mark.usefixtures("with_wheel")
249248
def test_install_no_binary_via_config_disables_cached_wheels(
250249
script: PipTestEnvironment, data: TestData
251250
) -> None:

tests/functional/test_install_direct_url.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@
55
from tests.lib.direct_url import get_created_direct_url
66

77

8-
@pytest.mark.usefixtures("with_wheel")
98
def test_install_find_links_no_direct_url(script: PipTestEnvironment) -> None:
109
result = script.pip_install_local("simple")
1110
assert not get_created_direct_url(result, "simple")
1211

1312

14-
@pytest.mark.usefixtures("with_wheel")
1513
def test_install_vcs_editable_no_direct_url(script: PipTestEnvironment) -> None:
1614
pkg_path = _create_test_package(script.scratch_path, name="testpkg")
1715
args = ["install", "-e", f"git+{pkg_path.as_uri()}#egg=testpkg"]
@@ -21,7 +19,6 @@ def test_install_vcs_editable_no_direct_url(script: PipTestEnvironment) -> None:
2119
assert not get_created_direct_url(result, "testpkg")
2220

2321

24-
@pytest.mark.usefixtures("with_wheel")
2522
def test_install_vcs_non_editable_direct_url(script: PipTestEnvironment) -> None:
2623
pkg_path = _create_test_package(script.scratch_path, name="testpkg")
2724
url = pkg_path.as_uri()
@@ -34,7 +31,6 @@ def test_install_vcs_non_editable_direct_url(script: PipTestEnvironment) -> None
3431
assert direct_url.info.vcs == "git"
3532

3633

37-
@pytest.mark.usefixtures("with_wheel")
3834
def test_install_archive_direct_url(script: PipTestEnvironment, data: TestData) -> None:
3935
req = "simple @ " + data.packages.joinpath("simple-2.0.tar.gz").as_uri()
4036
assert req.startswith("simple @ file://")
@@ -43,7 +39,6 @@ def test_install_archive_direct_url(script: PipTestEnvironment, data: TestData)
4339

4440

4541
@pytest.mark.network
46-
@pytest.mark.usefixtures("with_wheel")
4742
def test_install_vcs_constraint_direct_url(script: PipTestEnvironment) -> None:
4843
constraints_file = script.scratch_path / "constraints.txt"
4944
constraints_file.write_text(
@@ -55,7 +50,6 @@ def test_install_vcs_constraint_direct_url(script: PipTestEnvironment) -> None:
5550
assert get_created_direct_url(result, "pip_test_package")
5651

5752

58-
@pytest.mark.usefixtures("with_wheel")
5953
def test_install_vcs_constraint_direct_file_url(script: PipTestEnvironment) -> None:
6054
pkg_path = _create_test_package(script.scratch_path, name="testpkg")
6155
url = pkg_path.as_uri()

tests/functional/test_install_index.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import shutil
22
import textwrap
33

4-
import pytest
5-
64
from tests.lib import PipTestEnvironment, TestData
75

86

9-
@pytest.mark.usefixtures("with_wheel")
107
def test_find_links_relative_path(script: PipTestEnvironment, data: TestData) -> None:
118
"""Test find-links as a relative path."""
129
result = script.pip(
@@ -23,7 +20,6 @@ def test_find_links_relative_path(script: PipTestEnvironment, data: TestData) ->
2320
result.did_create(initools_folder)
2421

2522

26-
@pytest.mark.usefixtures("with_wheel")
2723
def test_find_links_no_doctype(script: PipTestEnvironment, data: TestData) -> None:
2824
shutil.copy(data.packages / "simple-1.0.tar.gz", script.scratch_path)
2925
html = script.scratch_path.joinpath("index.html")
@@ -39,7 +35,6 @@ def test_find_links_no_doctype(script: PipTestEnvironment, data: TestData) -> No
3935
assert not result.stderr
4036

4137

42-
@pytest.mark.usefixtures("with_wheel")
4338
def test_find_links_requirements_file_relative_path(
4439
script: PipTestEnvironment, data: TestData
4540
) -> None:
@@ -67,7 +62,6 @@ def test_find_links_requirements_file_relative_path(
6762
result.did_create(initools_folder)
6863

6964

70-
@pytest.mark.usefixtures("with_wheel")
7165
def test_install_from_file_index_hash_link(
7266
script: PipTestEnvironment, data: TestData
7367
) -> None:
@@ -80,7 +74,6 @@ def test_install_from_file_index_hash_link(
8074
result.did_create(dist_info_folder)
8175

8276

83-
@pytest.mark.usefixtures("with_wheel")
8477
def test_file_index_url_quoting(script: PipTestEnvironment, data: TestData) -> None:
8578
"""
8679
Test url quoting of file index url with a space

0 commit comments

Comments
 (0)