diff options
author | Stéphane Bidoul <stephane.bidoul@gmail.com> | 2023-03-18 16:08:21 +0100 |
---|---|---|
committer | Pradyun Gedam <pradyunsg@gmail.com> | 2023-03-27 11:55:20 +0100 |
commit | 3fd8fde14be7be880c88458d1c5f92211c2ec87e (patch) | |
tree | fb86fc1447180120b101dcf86be0b30f70ce90b5 /tests | |
parent | b31a308b08f8d0c810cbe3f9b472d2d4436503a3 (diff) | |
download | pip-3fd8fde14be7be880c88458d1c5f92211c2ec87e.tar.gz |
Remove with_wheel fixture
We install wheel by default in our test env.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/conftest.py | 5 | ||||
-rw-r--r-- | tests/functional/test_download.py | 2 | ||||
-rw-r--r-- | tests/functional/test_freeze.py | 3 | ||||
-rw-r--r-- | tests/functional/test_install.py | 28 | ||||
-rw-r--r-- | tests/functional/test_install_cleanup.py | 1 | ||||
-rw-r--r-- | tests/functional/test_install_config.py | 1 | ||||
-rw-r--r-- | tests/functional/test_install_direct_url.py | 6 | ||||
-rw-r--r-- | tests/functional/test_install_index.py | 7 | ||||
-rw-r--r-- | tests/functional/test_install_report.py | 6 | ||||
-rw-r--r-- | tests/functional/test_install_reqs.py | 6 | ||||
-rw-r--r-- | tests/functional/test_install_requested.py | 7 | ||||
-rw-r--r-- | tests/functional/test_install_upgrade.py | 8 | ||||
-rw-r--r-- | tests/functional/test_install_user.py | 1 | ||||
-rw-r--r-- | tests/functional/test_install_vcs_git.py | 3 | ||||
-rw-r--r-- | tests/functional/test_install_wheel.py | 4 | ||||
-rw-r--r-- | tests/functional/test_list.py | 1 | ||||
-rw-r--r-- | tests/functional/test_pep660.py | 7 | ||||
-rw-r--r-- | tests/functional/test_wheel.py | 2 |
18 files changed, 2 insertions, 96 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 23371f54a..13011f4fd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -503,11 +503,6 @@ def virtualenv( yield virtualenv_factory(tmpdir.joinpath("workspace", "venv")) -@pytest.fixture -def with_wheel(virtualenv: VirtualEnvironment, wheel_install: Path) -> None: - pass - - class ScriptFactory(Protocol): def __call__( self, diff --git a/tests/functional/test_download.py b/tests/functional/test_download.py index ede2213aa..31418ca8c 100644 --- a/tests/functional/test_download.py +++ b/tests/functional/test_download.py @@ -659,7 +659,6 @@ def make_wheel_with_python_requires( return package_dir / "dist" / file_name -@pytest.mark.usefixtures("with_wheel") def test_download__python_version_used_for_python_requires( script: PipTestEnvironment, data: TestData ) -> None: @@ -700,7 +699,6 @@ def test_download__python_version_used_for_python_requires( script.pip(*args) # no exception -@pytest.mark.usefixtures("with_wheel") def test_download_ignore_requires_python_dont_fail_with_wrong_python( script: PipTestEnvironment, ) -> None: diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py index 49b362d7e..b24b27edc 100644 --- a/tests/functional/test_freeze.py +++ b/tests/functional/test_freeze.py @@ -104,7 +104,6 @@ def test_exclude_and_normalization(script: PipTestEnvironment, tmpdir: Path) -> assert "Normalizable_Name" not in result.stdout -@pytest.mark.usefixtures("with_wheel") def test_freeze_multiple_exclude_with_all(script: PipTestEnvironment) -> None: result = script.pip("freeze", "--all") assert "pip==" in result.stdout @@ -962,7 +961,6 @@ def test_freeze_path_multiple( _check_output(result.stdout, expected) -@pytest.mark.usefixtures("with_wheel") def test_freeze_direct_url_archive( script: PipTestEnvironment, shared_data: TestData ) -> None: @@ -1005,7 +1003,6 @@ def test_freeze_include_work_dir_pkg(script: PipTestEnvironment) -> None: assert "simple==1.0" in result.stdout -@pytest.mark.usefixtures("with_wheel") def test_freeze_pep610_editable(script: PipTestEnvironment) -> None: """ Test that a package installed with a direct_url.json with editable=true diff --git a/tests/functional/test_install.py b/tests/functional/test_install.py index 1fa702a40..12f9c0141 100644 --- a/tests/functional/test_install.py +++ b/tests/functional/test_install.py @@ -272,7 +272,6 @@ def test_pep518_forkbombs( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_pip_second_command_line_interface_works( script: PipTestEnvironment, pip_src: Path, @@ -317,7 +316,6 @@ def test_install_exit_status_code_when_blank_requirements_file( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_basic_install_from_pypi(script: PipTestEnvironment) -> None: """ Test installing a package from PyPI. @@ -376,7 +374,6 @@ def test_basic_install_editable_from_git(script: PipTestEnvironment) -> None: _test_install_editable_from_git(script) -@pytest.mark.usefixtures("with_wheel") def test_install_editable_from_git_autobuild_wheel(script: PipTestEnvironment) -> None: _test_install_editable_from_git(script) @@ -503,7 +500,6 @@ def test_vcs_url_urlquote_normalization( @pytest.mark.parametrize("resolver", ["", "--use-deprecated=legacy-resolver"]) -@pytest.mark.usefixtures("with_wheel") def test_basic_install_from_local_directory( script: PipTestEnvironment, data: TestData, resolver: str ) -> None: @@ -533,7 +529,6 @@ def test_basic_install_from_local_directory( ("embedded_rel_path", True), ], ) -@pytest.mark.usefixtures("with_wheel") def test_basic_install_relative_directory( script: PipTestEnvironment, data: TestData, test_type: str, editable: bool ) -> None: @@ -655,7 +650,6 @@ def test_hashed_install_failure_later_flag( ) -@pytest.mark.usefixtures("with_wheel") def test_install_from_local_directory_with_in_tree_build( script: PipTestEnvironment, data: TestData ) -> None: @@ -800,7 +794,6 @@ def test_upgrade_argparse_shadowed(script: PipTestEnvironment) -> None: assert "Not uninstalling argparse" not in result.stdout -@pytest.mark.usefixtures("with_wheel") def test_install_curdir(script: PipTestEnvironment, data: TestData) -> None: """ Test installing current directory ('.'). @@ -817,7 +810,6 @@ def test_install_curdir(script: PipTestEnvironment, data: TestData) -> None: result.did_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_install_pardir(script: PipTestEnvironment, data: TestData) -> None: """ Test installing parent directory ('..'). @@ -877,7 +869,6 @@ def test_install_global_option_using_editable( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_package_with_same_name_in_curdir(script: PipTestEnvironment) -> None: """ Test installing a package with the same name of a local folder @@ -896,7 +887,6 @@ mock100_setup_py = textwrap.dedent( ) -@pytest.mark.usefixtures("with_wheel") def test_install_folder_using_dot_slash(script: PipTestEnvironment) -> None: """ Test installing a folder using pip install ./foldername @@ -909,7 +899,6 @@ def test_install_folder_using_dot_slash(script: PipTestEnvironment) -> None: result.did_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_install_folder_using_slash_in_the_end(script: PipTestEnvironment) -> None: r""" 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 result.did_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_install_folder_using_relative_path(script: PipTestEnvironment) -> None: """ Test installing a folder using pip install folder1/folder2 @@ -937,7 +925,6 @@ def test_install_folder_using_relative_path(script: PipTestEnvironment) -> None: @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_package_which_contains_dev_in_name(script: PipTestEnvironment) -> None: """ 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) result.did_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_install_package_with_target(script: PipTestEnvironment) -> None: """ Test installing a package using pip install --target @@ -1082,7 +1068,6 @@ def test_install_nonlocal_compatible_wheel_path( @pytest.mark.parametrize("opt", ("--target", "--prefix")) -@pytest.mark.usefixtures("with_wheel") def test_install_with_target_or_prefix_and_scripts_no_warning( opt: str, script: PipTestEnvironment ) -> None: @@ -1121,7 +1106,6 @@ def test_install_with_target_or_prefix_and_scripts_no_warning( assert "--no-warn-script-location" not in result.stderr, str(result) -@pytest.mark.usefixtures("with_wheel") def test_install_package_with_root(script: PipTestEnvironment, data: TestData) -> None: """ Test installing a package using pip install --root @@ -1318,7 +1302,6 @@ def test_install_package_with_latin1_setup( script.pip("install", to_install) -@pytest.mark.usefixtures("with_wheel") def test_url_req_case_mismatch_no_index( script: PipTestEnvironment, data: TestData ) -> None: @@ -1342,7 +1325,6 @@ def test_url_req_case_mismatch_no_index( result.did_not_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_url_req_case_mismatch_file_index( script: PipTestEnvironment, data: TestData ) -> None: @@ -1372,7 +1354,6 @@ def test_url_req_case_mismatch_file_index( result.did_not_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_url_incorrect_case_no_index( script: PipTestEnvironment, data: TestData ) -> None: @@ -1396,7 +1377,6 @@ def test_url_incorrect_case_no_index( result.did_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_url_incorrect_case_file_index( script: PipTestEnvironment, data: TestData ) -> None: @@ -1546,7 +1526,6 @@ def test_install_topological_sort(script: PipTestEnvironment, data: TestData) -> assert order1 in res or order2 in res, res -@pytest.mark.usefixtures("with_wheel") def test_install_wheel_broken(script: PipTestEnvironment) -> None: res = script.pip_install_local("wheelbroken", allow_stderr_error=True) assert "ERROR: Failed building wheel for wheelbroken" in res.stderr @@ -1554,7 +1533,6 @@ def test_install_wheel_broken(script: PipTestEnvironment) -> None: assert "Successfully installed wheelbroken-0.1" in str(res), str(res) -@pytest.mark.usefixtures("with_wheel") def test_cleanup_after_failed_wheel(script: PipTestEnvironment) -> None: res = script.pip_install_local("wheelbrokenafter", allow_stderr_error=True) assert "ERROR: Failed building wheel for wheelbrokenafter" in res.stderr @@ -1569,7 +1547,6 @@ def test_cleanup_after_failed_wheel(script: PipTestEnvironment) -> None: assert "Running setup.py clean for wheelbrokenafter" in str(res), str(res) -@pytest.mark.usefixtures("with_wheel") def test_install_builds_wheels(script: PipTestEnvironment, data: TestData) -> None: # We need to use a subprocess to get the right value on Windows. res = script.run( @@ -1622,7 +1599,6 @@ def test_install_builds_wheels(script: PipTestEnvironment, data: TestData) -> No ] -@pytest.mark.usefixtures("with_wheel") def test_install_no_binary_disables_building_wheels( script: PipTestEnvironment, data: TestData ) -> None: @@ -1653,7 +1629,6 @@ def test_install_no_binary_disables_building_wheels( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_no_binary_builds_pep_517_wheel( script: PipTestEnvironment, data: TestData ) -> None: @@ -1668,7 +1643,6 @@ def test_install_no_binary_builds_pep_517_wheel( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_no_binary_uses_local_backend( script: PipTestEnvironment, data: TestData, tmpdir: Path ) -> None: @@ -1682,7 +1656,6 @@ def test_install_no_binary_uses_local_backend( assert os.path.isfile(marker), "Local PEP 517 backend not used" -@pytest.mark.usefixtures("with_wheel") def test_install_no_binary_disables_cached_wheels( script: PipTestEnvironment, data: TestData ) -> None: @@ -1821,7 +1794,6 @@ def test_install_incompatible_python_requires_editable( assert _get_expected_error_text() in result.stderr, str(result) -@pytest.mark.usefixtures("with_wheel") def test_install_incompatible_python_requires_wheel(script: PipTestEnvironment) -> None: script.scratch_path.joinpath("pkga").mkdir() pkga_path = script.scratch_path / "pkga" diff --git a/tests/functional/test_install_cleanup.py b/tests/functional/test_install_cleanup.py index c0ea5a425..bc34defc9 100644 --- a/tests/functional/test_install_cleanup.py +++ b/tests/functional/test_install_cleanup.py @@ -31,7 +31,6 @@ def test_no_clean_option_blocks_cleaning_after_install( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_pep517_no_legacy_cleanup(script: PipTestEnvironment, data: TestData) -> None: """Test a PEP 517 failed build does not attempt a legacy cleanup""" to_install = data.packages.joinpath("pep517_wrapper_buildsys") diff --git a/tests/functional/test_install_config.py b/tests/functional/test_install_config.py index 04e489ceb..563b5604a 100644 --- a/tests/functional/test_install_config.py +++ b/tests/functional/test_install_config.py @@ -245,7 +245,6 @@ def test_options_from_venv_config( assert msg.lower() in result.stdout.lower(), str(result) -@pytest.mark.usefixtures("with_wheel") def test_install_no_binary_via_config_disables_cached_wheels( script: PipTestEnvironment, data: TestData ) -> None: diff --git a/tests/functional/test_install_direct_url.py b/tests/functional/test_install_direct_url.py index cd2a4aea7..139ef178e 100644 --- a/tests/functional/test_install_direct_url.py +++ b/tests/functional/test_install_direct_url.py @@ -5,13 +5,11 @@ from tests.lib import PipTestEnvironment, TestData, _create_test_package from tests.lib.direct_url import get_created_direct_url -@pytest.mark.usefixtures("with_wheel") def test_install_find_links_no_direct_url(script: PipTestEnvironment) -> None: result = script.pip_install_local("simple") assert not get_created_direct_url(result, "simple") -@pytest.mark.usefixtures("with_wheel") def test_install_vcs_editable_no_direct_url(script: PipTestEnvironment) -> None: pkg_path = _create_test_package(script.scratch_path, name="testpkg") 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: assert not get_created_direct_url(result, "testpkg") -@pytest.mark.usefixtures("with_wheel") def test_install_vcs_non_editable_direct_url(script: PipTestEnvironment) -> None: pkg_path = _create_test_package(script.scratch_path, name="testpkg") url = pkg_path.as_uri() @@ -34,7 +31,6 @@ def test_install_vcs_non_editable_direct_url(script: PipTestEnvironment) -> None assert direct_url.info.vcs == "git" -@pytest.mark.usefixtures("with_wheel") def test_install_archive_direct_url(script: PipTestEnvironment, data: TestData) -> None: req = "simple @ " + data.packages.joinpath("simple-2.0.tar.gz").as_uri() assert req.startswith("simple @ file://") @@ -43,7 +39,6 @@ def test_install_archive_direct_url(script: PipTestEnvironment, data: TestData) @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_vcs_constraint_direct_url(script: PipTestEnvironment) -> None: constraints_file = script.scratch_path / "constraints.txt" constraints_file.write_text( @@ -55,7 +50,6 @@ def test_install_vcs_constraint_direct_url(script: PipTestEnvironment) -> None: assert get_created_direct_url(result, "pip_test_package") -@pytest.mark.usefixtures("with_wheel") def test_install_vcs_constraint_direct_file_url(script: PipTestEnvironment) -> None: pkg_path = _create_test_package(script.scratch_path, name="testpkg") url = pkg_path.as_uri() diff --git a/tests/functional/test_install_index.py b/tests/functional/test_install_index.py index c1f0ecbd7..b73e28f47 100644 --- a/tests/functional/test_install_index.py +++ b/tests/functional/test_install_index.py @@ -1,12 +1,9 @@ import shutil import textwrap -import pytest - from tests.lib import PipTestEnvironment, TestData -@pytest.mark.usefixtures("with_wheel") def test_find_links_relative_path(script: PipTestEnvironment, data: TestData) -> None: """Test find-links as a relative path.""" result = script.pip( @@ -23,7 +20,6 @@ def test_find_links_relative_path(script: PipTestEnvironment, data: TestData) -> result.did_create(initools_folder) -@pytest.mark.usefixtures("with_wheel") def test_find_links_no_doctype(script: PipTestEnvironment, data: TestData) -> None: shutil.copy(data.packages / "simple-1.0.tar.gz", script.scratch_path) html = script.scratch_path.joinpath("index.html") @@ -39,7 +35,6 @@ def test_find_links_no_doctype(script: PipTestEnvironment, data: TestData) -> No assert not result.stderr -@pytest.mark.usefixtures("with_wheel") def test_find_links_requirements_file_relative_path( script: PipTestEnvironment, data: TestData ) -> None: @@ -67,7 +62,6 @@ def test_find_links_requirements_file_relative_path( result.did_create(initools_folder) -@pytest.mark.usefixtures("with_wheel") def test_install_from_file_index_hash_link( script: PipTestEnvironment, data: TestData ) -> None: @@ -80,7 +74,6 @@ def test_install_from_file_index_hash_link( result.did_create(dist_info_folder) -@pytest.mark.usefixtures("with_wheel") def test_file_index_url_quoting(script: PipTestEnvironment, data: TestData) -> None: """ Test url quoting of file index url with a space diff --git a/tests/functional/test_install_report.py b/tests/functional/test_install_report.py index 70f71e223..83f5b5c2c 100644 --- a/tests/functional/test_install_report.py +++ b/tests/functional/test_install_report.py @@ -12,7 +12,6 @@ def _install_dict(report: Dict[str, Any]) -> Dict[str, Any]: return {canonicalize_name(i["metadata"]["name"]): i for i in report["install"]} -@pytest.mark.usefixtures("with_wheel") def test_install_report_basic( script: PipTestEnvironment, shared_data: TestData, tmp_path: Path ) -> None: @@ -43,7 +42,6 @@ def test_install_report_basic( ) -@pytest.mark.usefixtures("with_wheel") def test_install_report_dep( script: PipTestEnvironment, shared_data: TestData, tmp_path: Path ) -> None: @@ -66,7 +64,6 @@ def test_install_report_dep( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_report_index(script: PipTestEnvironment, tmp_path: Path) -> None: """Test report for sdist obtained from index.""" report_path = tmp_path / "report.json" @@ -96,7 +93,6 @@ def test_install_report_index(script: PipTestEnvironment, tmp_path: Path) -> Non @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_report_vcs_and_wheel_cache( script: PipTestEnvironment, tmp_path: Path ) -> None: @@ -157,7 +153,6 @@ def test_install_report_vcs_and_wheel_cache( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_report_vcs_editable( script: PipTestEnvironment, tmp_path: Path ) -> None: @@ -183,7 +178,6 @@ def test_install_report_vcs_editable( assert pip_test_package_report["download_info"]["dir_info"]["editable"] is True -@pytest.mark.usefixtures("with_wheel") def test_install_report_to_stdout( script: PipTestEnvironment, shared_data: TestData ) -> None: diff --git a/tests/functional/test_install_reqs.py b/tests/functional/test_install_reqs.py index a52274fec..3ad953481 100644 --- a/tests/functional/test_install_reqs.py +++ b/tests/functional/test_install_reqs.py @@ -62,7 +62,6 @@ def arg_recording_sdist_maker( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_requirements_file(script: PipTestEnvironment) -> None: """ Test installing from a requirements file. @@ -113,7 +112,6 @@ def test_schema_check_in_requirements_file(script: PipTestEnvironment) -> None: ("embedded_rel_path", True), ], ) -@pytest.mark.usefixtures("with_wheel") def test_relative_requirements_file( script: PipTestEnvironment, data: TestData, test_type: str, editable: bool ) -> None: @@ -161,7 +159,6 @@ def test_relative_requirements_file( @pytest.mark.xfail @pytest.mark.network @need_svn -@pytest.mark.usefixtures("with_wheel") def test_multiple_requirements_files(script: PipTestEnvironment, tmpdir: Path) -> None: """ Test installing from multiple nested requirements files. @@ -305,7 +302,7 @@ def test_install_local_with_subdirectory(script: PipTestEnvironment) -> None: result.assert_installed("version_subpkg.py", editable=False) -@pytest.mark.usefixtures("enable_user_site", "with_wheel") +@pytest.mark.usefixtures("enable_user_site") def test_wheel_user_with_prefix_in_pydistutils_cfg( script: PipTestEnvironment, data: TestData ) -> None: @@ -488,7 +485,6 @@ def test_constrained_to_url_install_same_url( assert "Building wheel for singlemodule" in result.stdout, str(result) -@pytest.mark.usefixtures("with_wheel") def test_double_install_spurious_hash_mismatch( script: PipTestEnvironment, tmpdir: Path, data: TestData ) -> None: diff --git a/tests/functional/test_install_requested.py b/tests/functional/test_install_requested.py index edc289f43..2c5cad9fc 100644 --- a/tests/functional/test_install_requested.py +++ b/tests/functional/test_install_requested.py @@ -21,7 +21,6 @@ def _assert_requested_absent( assert requested not in result.files_created -@pytest.mark.usefixtures("with_wheel") def test_install_requested_basic(script: PipTestEnvironment, data: TestData) -> None: result = script.pip( "install", "--no-index", "-f", data.find_links, "require_simple" @@ -31,7 +30,6 @@ def test_install_requested_basic(script: PipTestEnvironment, data: TestData) -> _assert_requested_absent(script, result, "simple", "3.0") -@pytest.mark.usefixtures("with_wheel") def test_install_requested_requirements( script: PipTestEnvironment, data: TestData ) -> None: @@ -48,7 +46,6 @@ def test_install_requested_requirements( _assert_requested_absent(script, result, "simple", "3.0") -@pytest.mark.usefixtures("with_wheel") def test_install_requested_dep_in_requirements( script: PipTestEnvironment, data: TestData ) -> None: @@ -68,7 +65,6 @@ def test_install_requested_dep_in_requirements( _assert_requested_present(script, result, "simple", "2.0") -@pytest.mark.usefixtures("with_wheel") def test_install_requested_reqs_and_constraints( script: PipTestEnvironment, data: TestData ) -> None: @@ -89,7 +85,6 @@ def test_install_requested_reqs_and_constraints( _assert_requested_absent(script, result, "simple", "2.0") -@pytest.mark.usefixtures("with_wheel") def test_install_requested_in_reqs_and_constraints( script: PipTestEnvironment, data: TestData ) -> None: @@ -112,7 +107,6 @@ def test_install_requested_in_reqs_and_constraints( _assert_requested_present(script, result, "simple", "2.0") -@pytest.mark.usefixtures("with_wheel") def test_install_requested_from_cli_with_constraint( script: PipTestEnvironment, data: TestData ) -> None: @@ -130,7 +124,6 @@ def test_install_requested_from_cli_with_constraint( _assert_requested_present(script, result, "simple", "2.0") -@pytest.mark.usefixtures("with_wheel") @pytest.mark.network def test_install_requested_from_cli_with_url_constraint( script: PipTestEnvironment, data: TestData diff --git a/tests/functional/test_install_upgrade.py b/tests/functional/test_install_upgrade.py index 0da195c05..fc61d70bc 100644 --- a/tests/functional/test_install_upgrade.py +++ b/tests/functional/test_install_upgrade.py @@ -38,7 +38,6 @@ def test_invalid_upgrade_strategy_causes_error(script: PipTestEnvironment) -> No assert "invalid choice" in result.stderr -@pytest.mark.usefixtures("with_wheel") def test_only_if_needed_does_not_upgrade_deps_when_satisfied( script: PipTestEnvironment, resolver_variant: ResolverVariant ) -> None: @@ -66,7 +65,6 @@ def test_only_if_needed_does_not_upgrade_deps_when_satisfied( ), "did not print correct message for not-upgraded requirement" -@pytest.mark.usefixtures("with_wheel") def test_only_if_needed_does_upgrade_deps_when_no_longer_satisfied( script: PipTestEnvironment, ) -> None: @@ -88,7 +86,6 @@ def test_only_if_needed_does_upgrade_deps_when_no_longer_satisfied( assert expected in result.files_deleted, "should have uninstalled simple==1.0" -@pytest.mark.usefixtures("with_wheel") def test_eager_does_upgrade_dependencies_when_currently_satisfied( script: PipTestEnvironment, ) -> None: @@ -109,7 +106,6 @@ def test_eager_does_upgrade_dependencies_when_currently_satisfied( ) in result.files_deleted, "should have uninstalled simple==2.0" -@pytest.mark.usefixtures("with_wheel") def test_eager_does_upgrade_dependencies_when_no_longer_satisfied( script: PipTestEnvironment, ) -> None: @@ -135,7 +131,6 @@ def test_eager_does_upgrade_dependencies_when_no_longer_satisfied( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_upgrade_to_specific_version(script: PipTestEnvironment) -> None: """ It does upgrade to specific version requested. @@ -149,7 +144,6 @@ def test_upgrade_to_specific_version(script: PipTestEnvironment) -> None: @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_upgrade_if_requested(script: PipTestEnvironment) -> None: """ And it does upgrade if requested. @@ -312,7 +306,6 @@ def test_uninstall_rollback(script: PipTestEnvironment, data: TestData) -> None: @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_should_not_install_always_from_cache(script: PipTestEnvironment) -> None: """ If there is an old cached package, pip should download the newer version @@ -326,7 +319,6 @@ def test_should_not_install_always_from_cache(script: PipTestEnvironment) -> Non @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_with_ignoreinstalled_requested(script: PipTestEnvironment) -> None: """ Test old conflicting package is completely ignored diff --git a/tests/functional/test_install_user.py b/tests/functional/test_install_user.py index bebc7e420..9bdadb942 100644 --- a/tests/functional/test_install_user.py +++ b/tests/functional/test_install_user.py @@ -76,7 +76,6 @@ class Tests_UserSite: ) result.assert_installed("INITools", use_user_site=True) - @pytest.mark.usefixtures("with_wheel") def test_install_from_current_directory_into_usersite( self, script: PipTestEnvironment, data: TestData ) -> None: diff --git a/tests/functional/test_install_vcs_git.py b/tests/functional/test_install_vcs_git.py index 60b7715a9..d7e8c2602 100644 --- a/tests/functional/test_install_vcs_git.py +++ b/tests/functional/test_install_vcs_git.py @@ -186,7 +186,6 @@ def test_install_editable_from_git_with_https( @pytest.mark.network -@pytest.mark.usefixtures("with_wheel") def test_install_noneditable_git(script: PipTestEnvironment) -> None: """ Test installing from a non-editable git URL with a given tag. @@ -580,7 +579,6 @@ def test_check_submodule_addition(script: PipTestEnvironment) -> None: update_result.did_create(script.venv / "src/version-pkg/testpkg/static/testfile2") -@pytest.mark.usefixtures("with_wheel") def test_install_git_branch_not_cached(script: PipTestEnvironment) -> None: """ Installing git urls with a branch revision does not cause wheel caching. @@ -596,7 +594,6 @@ def test_install_git_branch_not_cached(script: PipTestEnvironment) -> None: assert f"Successfully built {PKG}" in result.stdout, result.stdout -@pytest.mark.usefixtures("with_wheel") def test_install_git_sha_cached(script: PipTestEnvironment) -> None: """ Installing git urls with a sha revision does cause wheel caching. diff --git a/tests/functional/test_install_wheel.py b/tests/functional/test_install_wheel.py index 49c2d1d6d..4221ae76a 100644 --- a/tests/functional/test_install_wheel.py +++ b/tests/functional/test_install_wheel.py @@ -195,7 +195,6 @@ def test_install_from_wheel_with_headers(script: PipTestEnvironment) -> None: assert header_path.read_text() == header_text -@pytest.mark.usefixtures("with_wheel") def test_install_wheel_with_target( script: PipTestEnvironment, shared_data: TestData, tmpdir: Path ) -> None: @@ -216,7 +215,6 @@ def test_install_wheel_with_target( result.did_create(Path("scratch") / "target" / "simpledist") -@pytest.mark.usefixtures("with_wheel") def test_install_wheel_with_target_and_data_files( script: PipTestEnvironment, data: TestData ) -> None: @@ -406,7 +404,7 @@ def test_wheel_record_lines_have_updated_hash_for_scripts( ] -@pytest.mark.usefixtures("enable_user_site", "with_wheel") +@pytest.mark.usefixtures("enable_user_site") def test_install_user_wheel( script: PipTestEnvironment, shared_data: TestData, tmpdir: Path ) -> None: diff --git a/tests/functional/test_list.py b/tests/functional/test_list.py index d05fe9dce..bd45f82df 100644 --- a/tests/functional/test_list.py +++ b/tests/functional/test_list.py @@ -734,7 +734,6 @@ def test_list_include_work_dir_pkg(script: PipTestEnvironment) -> None: assert {"name": "simple", "version": "1.0"} in json_result -@pytest.mark.usefixtures("with_wheel") def test_list_pep610_editable(script: PipTestEnvironment) -> None: """ Test that a package installed with a direct_url.json with editable=true diff --git a/tests/functional/test_pep660.py b/tests/functional/test_pep660.py index 874f72036..8418b2689 100644 --- a/tests/functional/test_pep660.py +++ b/tests/functional/test_pep660.py @@ -2,7 +2,6 @@ import os from pathlib import Path from typing import Any, Dict -import pytest import tomli_w from tests.lib import PipTestEnvironment @@ -94,7 +93,6 @@ def _assert_hook_not_called(project_dir: Path, hook: str) -> None: assert f":{hook} called" not in log, f"{hook} should not have been called" -@pytest.mark.usefixtures("with_wheel") def test_install_pep517_basic(tmpdir: Path, script: PipTestEnvironment) -> None: """ Check that the test harness we have in this file is sane. @@ -110,7 +108,6 @@ def test_install_pep517_basic(tmpdir: Path, script: PipTestEnvironment) -> None: _assert_hook_called(project_dir, "build_wheel") -@pytest.mark.usefixtures("with_wheel") def test_install_pep660_basic(tmpdir: Path, script: PipTestEnvironment) -> None: """ Test with backend that supports build_editable. @@ -131,7 +128,6 @@ def test_install_pep660_basic(tmpdir: Path, script: PipTestEnvironment) -> None: ), "a .egg-link file should not have been created" -@pytest.mark.usefixtures("with_wheel") def test_install_no_pep660_setup_py_fallback( tmpdir: Path, script: PipTestEnvironment ) -> None: @@ -156,7 +152,6 @@ def test_install_no_pep660_setup_py_fallback( ), "a .egg-link file should have been created" -@pytest.mark.usefixtures("with_wheel") def test_install_no_pep660_setup_cfg_fallback( tmpdir: Path, script: PipTestEnvironment ) -> None: @@ -182,7 +177,6 @@ def test_install_no_pep660_setup_cfg_fallback( ), ".egg-link file should have been created" -@pytest.mark.usefixtures("with_wheel") def test_wheel_editable_pep660_basic(tmpdir: Path, script: PipTestEnvironment) -> None: """ Test 'pip wheel' of an editable pep 660 project. @@ -206,7 +200,6 @@ def test_wheel_editable_pep660_basic(tmpdir: Path, script: PipTestEnvironment) - assert len(os.listdir(str(wheel_dir))) == 1, "a wheel should have been created" -@pytest.mark.usefixtures("with_wheel") def test_download_editable_pep660_basic( tmpdir: Path, script: PipTestEnvironment ) -> None: diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py index 071b60c70..1e3e90e41 100644 --- a/tests/functional/test_wheel.py +++ b/tests/functional/test_wheel.py @@ -10,8 +10,6 @@ from pip._internal.cli.status_codes import ERROR from tests.lib import pyversion # noqa: F401 from tests.lib import PipTestEnvironment, TestData -pytestmark = pytest.mark.usefixtures("with_wheel") - def add_files_to_dist_directory(folder: Path) -> None: (folder / "dist").mkdir(parents=True) |