Spec.__contains__: traverse only lin/run + direct build

This commit is contained in:
Massimiliano Culpo 2024-11-12 09:20:22 +01:00
parent 57e42f6a6b
commit 940b130b5e
No known key found for this signature in database
GPG Key ID: 3E52BB992233066C
2 changed files with 4 additions and 3 deletions

View File

@ -1181,7 +1181,8 @@ def test_conditional_provides_or_depends_on(self):
s = Spec("conditional-provider +disable-v1").concretized()
assert "v1-provider" in s
assert s["v1"].name == "v1-provider"
assert s["v2"].name == "conditional-provider"
assert s.package.provides("v2")
assert "v2" not in s
@pytest.mark.regression("20079")
@pytest.mark.parametrize(

View File

@ -257,7 +257,7 @@ def test_external_mpi(self):
# make sure this doesn't give us an external first.
spec = Spec("mpi")
spec.concretize()
assert not spec["mpi"].external
assert not spec.external and spec.package.provides("mpi")
# load config
conf = syaml.load_config(
@ -293,7 +293,7 @@ def mock_module(cmd, module):
spec = Spec("mpi")
spec.concretize()
assert not spec["mpi"].external
assert not spec.external and spec.package.provides("mpi")
# load config
conf = syaml.load_config(