Skip to content

Commit cb2d4b8

Browse files
authored
Merge pull request #10526 from uranusjr/remove-extra-merge-xfail
2 parents c8a8d6d + 12cb745 commit cb2d4b8

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ allow_untyped_defs = True
5757

5858
[tool:pytest]
5959
addopts = --ignore src/pip/_vendor --ignore tests/tests_cache -r aR --color=yes
60+
xfail_strict = True
6061
markers =
6162
network: tests that need network
6263
incompatible_with_sysconfig

tests/functional/test_install_extras.py

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,22 @@ def test_install_requirements_no_r_flag(script):
172172

173173

174174
@pytest.mark.parametrize(
175-
"extra_to_install, simple_version",
175+
"extra_to_install, simple_version, fails_on_legacy",
176176
[
177-
["", "3.0"],
178-
pytest.param("[extra1]", "2.0", marks=pytest.mark.xfail),
179-
pytest.param("[extra2]", "1.0", marks=pytest.mark.xfail),
180-
pytest.param("[extra1,extra2]", "1.0", marks=pytest.mark.xfail),
177+
("", "3.0", False),
178+
("[extra1]", "2.0", True),
179+
("[extra2]", "1.0", True),
180+
("[extra1,extra2]", "1.0", True),
181181
],
182182
)
183-
def test_install_extra_merging(script, data, extra_to_install, simple_version):
183+
@pytest.mark.usefixtures("data")
184+
def test_install_extra_merging(
185+
script,
186+
resolver_variant,
187+
extra_to_install,
188+
simple_version,
189+
fails_on_legacy,
190+
):
184191
# Check that extra specifications in the extras section are honoured.
185192
pkga_path = script.scratch_path / "pkga"
186193
pkga_path.mkdir()
@@ -200,6 +207,9 @@ def test_install_extra_merging(script, data, extra_to_install, simple_version):
200207

201208
result = script.pip_install_local(
202209
f"{pkga_path}{extra_to_install}",
210+
expect_error=(fails_on_legacy and resolver_variant == "legacy"),
203211
)
204212

205-
assert f"Successfully installed pkga-0.1 simple-{simple_version}" in result.stdout
213+
if not fails_on_legacy or resolver_variant == "2020-resolver":
214+
expected = f"Successfully installed pkga-0.1 simple-{simple_version}"
215+
assert expected in result.stdout

tests/functional/test_install_reqs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def test_multiple_constraints_files(script, data):
213213
assert "installed Upper-1.0" in result.stdout
214214

215215

216-
@pytest.mark.xfail(reason="Unclear what this guarantee is for.")
216+
# FIXME: Unclear what this guarantee is for.
217217
def test_respect_order_in_requirements_file(script, data):
218218
script.scratch_path.joinpath("frameworks-req.txt").write_text(
219219
textwrap.dedent(

tests/functional/test_wheel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ def test_pip_wheel_fail(script, data):
240240
assert result.returncode != 0
241241

242242

243-
@pytest.mark.xfail(reason="The --build option was removed")
244243
def test_no_clean_option_blocks_cleaning_after_wheel(
245244
script,
246245
data,

tests/unit/test_models_wheel.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,6 @@ def test_not_supported_osx_version(self) -> None:
9292
w = Wheel("simple-0.1-cp27-none-macosx_10_9_intel.whl")
9393
assert not w.supported(tags=tags)
9494

95-
@pytest.mark.xfail(
96-
reason=(
97-
"packaging.tags changed behaviour in this area, and @pradyunsg "
98-
"decided as the release manager that this behaviour change is less "
99-
"critical than Big Sur support for pip 20.3. See "
100-
"https://github.com/pypa/packaging/pull/361 for further discussion."
101-
)
102-
)
10395
def test_supported_multiarch_darwin(self) -> None:
10496
"""
10597
Multi-arch wheels (intel) are supported on components (i386, x86_64)

0 commit comments

Comments
 (0)