Minor tweak to a test docstring (#41985)

* Minor tweak to a test docstring

Shorten the description of a fixture, extend the description
of the test where it's used.

* Fix typo
This commit is contained in:
Massimiliano Culpo
2024-01-08 18:57:18 +01:00
committed by GitHub
parent 963e2ca828
commit b4621e524c

View File

@@ -134,12 +134,7 @@ def current_host(request, monkeypatch):
@pytest.fixture(scope="function", params=[True, False]) @pytest.fixture(scope="function", params=[True, False])
def fuzz_dep_order(request, monkeypatch): def fuzz_dep_order(request, monkeypatch):
"""Metafunction that tweaks the order of iteration over dependencies in the concretizer. """Meta-function that tweaks the order of iteration over dependencies in a package."""
The original concretizer can be sensitive to this, so we use this to ensure that it
is tested forwards and backwards.
"""
def reverser(pkg_name): def reverser(pkg_name):
if request.param: if request.param:
@@ -914,6 +909,12 @@ def test_conditional_variants_fail(self, bad_spec):
], ],
) )
def test_conditional_dependencies(self, spec_str, expected, unexpected, fuzz_dep_order): def test_conditional_dependencies(self, spec_str, expected, unexpected, fuzz_dep_order):
"""Tests that conditional dependencies are correctly attached.
The original concretizer can be sensitive to the iteration order over the dependencies of
a package, so we use a fuzzer function to test concretization with dependencies iterated
forwards and backwards.
"""
fuzz_dep_order("py-extension3") # test forwards and backwards fuzz_dep_order("py-extension3") # test forwards and backwards
s = Spec(spec_str).concretized() s = Spec(spec_str).concretized()