diff --git a/setup.cfg b/setup.cfg index 6a3e8c7f5da..0f790570583 100644 --- a/setup.cfg +++ b/setup.cfg @@ -61,6 +61,7 @@ allow_untyped_defs = True [tool:pytest] addopts = --ignore src/pip/_vendor --ignore tests/tests_cache -r aR --color=yes +xfail_strict = True markers = network: tests that need network incompatible_with_sysconfig diff --git a/tests/functional/test_install_extras.py b/tests/functional/test_install_extras.py index 18e9f6e8129..b950e5bae02 100644 --- a/tests/functional/test_install_extras.py +++ b/tests/functional/test_install_extras.py @@ -172,15 +172,22 @@ def test_install_requirements_no_r_flag(script): @pytest.mark.parametrize( - "extra_to_install, simple_version", + "extra_to_install, simple_version, fails_on_legacy", [ - ["", "3.0"], - pytest.param("[extra1]", "2.0", marks=pytest.mark.xfail), - pytest.param("[extra2]", "1.0", marks=pytest.mark.xfail), - pytest.param("[extra1,extra2]", "1.0", marks=pytest.mark.xfail), + ("", "3.0", False), + ("[extra1]", "2.0", True), + ("[extra2]", "1.0", True), + ("[extra1,extra2]", "1.0", True), ], ) -def test_install_extra_merging(script, data, extra_to_install, simple_version): +@pytest.mark.usefixtures("data") +def test_install_extra_merging( + script, + resolver_variant, + extra_to_install, + simple_version, + fails_on_legacy, +): # Check that extra specifications in the extras section are honoured. pkga_path = script.scratch_path / "pkga" pkga_path.mkdir() @@ -200,6 +207,9 @@ def test_install_extra_merging(script, data, extra_to_install, simple_version): result = script.pip_install_local( f"{pkga_path}{extra_to_install}", + expect_error=(fails_on_legacy and resolver_variant == "legacy"), ) - assert f"Successfully installed pkga-0.1 simple-{simple_version}" in result.stdout + if not fails_on_legacy or resolver_variant == "2020-resolver": + expected = f"Successfully installed pkga-0.1 simple-{simple_version}" + assert expected in result.stdout diff --git a/tests/functional/test_install_reqs.py b/tests/functional/test_install_reqs.py index 049cd7ab545..520ad01897b 100644 --- a/tests/functional/test_install_reqs.py +++ b/tests/functional/test_install_reqs.py @@ -213,7 +213,7 @@ def test_multiple_constraints_files(script, data): assert "installed Upper-1.0" in result.stdout -@pytest.mark.xfail(reason="Unclear what this guarantee is for.") +# FIXME: Unclear what this guarantee is for. def test_respect_order_in_requirements_file(script, data): script.scratch_path.joinpath("frameworks-req.txt").write_text( textwrap.dedent( diff --git a/tests/functional/test_wheel.py b/tests/functional/test_wheel.py index 7b3932af067..17d94e85314 100644 --- a/tests/functional/test_wheel.py +++ b/tests/functional/test_wheel.py @@ -240,7 +240,6 @@ def test_pip_wheel_fail(script, data): assert result.returncode != 0 -@pytest.mark.xfail(reason="The --build option was removed") def test_no_clean_option_blocks_cleaning_after_wheel( script, data, diff --git a/tests/unit/test_models_wheel.py b/tests/unit/test_models_wheel.py index 4ada81f70be..c06525e089e 100644 --- a/tests/unit/test_models_wheel.py +++ b/tests/unit/test_models_wheel.py @@ -92,14 +92,6 @@ def test_not_supported_osx_version(self) -> None: w = Wheel("simple-0.1-cp27-none-macosx_10_9_intel.whl") assert not w.supported(tags=tags) - @pytest.mark.xfail( - reason=( - "packaging.tags changed behaviour in this area, and @pradyunsg " - "decided as the release manager that this behaviour change is less " - "critical than Big Sur support for pip 20.3. See " - "https://github.com/pypa/packaging/pull/361 for further discussion." - ) - ) def test_supported_multiarch_darwin(self) -> None: """ Multi-arch wheels (intel) are supported on components (i386, x86_64)