test_load_json_specfiles: skip virtual reconstruction (#50361)

This commit is contained in:
Tamara Dahlgren 2025-05-14 01:32:47 -07:00 committed by GitHub
parent abcc641373
commit 719fd6fb43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -420,7 +420,9 @@ def test_load_json_specfiles(specfile, expected_hash, reader_cls):
openmpi_edges = s2.edges_to_dependencies(name="openmpi") openmpi_edges = s2.edges_to_dependencies(name="openmpi")
assert len(openmpi_edges) == 1 assert len(openmpi_edges) == 1
# Check that virtuals have been reconstructed # Check that virtuals have been reconstructed for specfiles conforming to
# version 4 on.
if reader_cls.SPEC_VERSION >= spack.spec.SpecfileV4.SPEC_VERSION:
assert "mpi" in openmpi_edges[0].virtuals assert "mpi" in openmpi_edges[0].virtuals
# The virtuals attribute must be a tuple, when read from a # The virtuals attribute must be a tuple, when read from a