diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/test/llnl/util/cpu.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/spack/spack/test/llnl/util/cpu.py b/lib/spack/spack/test/llnl/util/cpu.py index bcefcc04f0..300ee3c284 100644 --- a/lib/spack/spack/test/llnl/util/cpu.py +++ b/lib/spack/spack/test/llnl/util/cpu.py @@ -278,3 +278,14 @@ def test_version_components(version, expected_number, expected_suffix): number, suffix = llnl.util.cpu.version_components(version) assert number == expected_number assert suffix == expected_suffix + + +def test_invalid_family(): + targets = llnl.util.cpu.targets + multi_parents = Microarchitecture( + name='chimera', parents=[targets['pentium4'], targets['power7']], + vendor='Imagination', features=[], compilers={}, generation=0 + ) + with pytest.raises(AssertionError, + matches='a target is expected to belong'): + multi_parents.family |