summaryrefslogtreecommitdiff
path: root/lib/spack/spack/test/spec_semantics.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/test/spec_semantics.py')
-rw-r--r--lib/spack/spack/test/spec_semantics.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/spack/spack/test/spec_semantics.py b/lib/spack/spack/test/spec_semantics.py
index 1623133ef3..4ed7c635e9 100644
--- a/lib/spack/spack/test/spec_semantics.py
+++ b/lib/spack/spack/test/spec_semantics.py
@@ -307,6 +307,20 @@ class TestSpecSematics(object):
# Check that conditional dependencies are treated correctly
assert '^b' in a
+ def test_unsatisfied_single_valued_variant(self):
+ a = Spec('a foobar=baz')
+ a.concretize()
+ assert '^b' not in a
+
+ mv = Spec('multivalue_variant')
+ mv.concretize()
+ assert 'a@1.0' not in mv
+
+ def test_indirect_unsatisfied_single_valued_variant(self):
+ spec = Spec('singlevalue-variant-dependent')
+ spec.concretize()
+ assert 'a@1.0' not in spec
+
def test_unsatisfiable_multi_value_variant(self):
# Semantics for a multi-valued variant is different