summaryrefslogtreecommitdiff
path: root/lib/spack/spack/test/multimethod.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/test/multimethod.py')
-rw-r--r--lib/spack/spack/test/multimethod.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py
index e4546c5139..7e5231ee93 100644
--- a/lib/spack/spack/test/multimethod.py
+++ b/lib/spack/spack/test/multimethod.py
@@ -7,14 +7,13 @@
import pytest
+import spack.config
import spack.platforms
-import spack.repo
import spack.spec
from spack.multimethod import NoSuchMethodError
pytestmark = [
pytest.mark.usefixtures("mock_packages", "config"),
- pytest.mark.only_clingo("The original concretizer cannot concretize most of the specs"),
pytest.mark.not_on_windows("Not running on windows"),
]
@@ -69,9 +68,15 @@ def test_no_version_match(pkg_name):
("", "boolean_false_first", "True"),
],
)
-def test_multimethod_calls(pkg_name, constraint_str, method_name, expected_result):
- s = spack.spec.Spec(pkg_name + constraint_str).concretized()
- msg = "Method {0} from {1} is giving a wrong result".format(method_name, s)
+def test_multimethod_calls(
+ pkg_name, constraint_str, method_name, expected_result, compiler_factory
+):
+ # Add apple-clang, as it is required by one of the tests
+ with spack.config.override(
+ "compilers", [compiler_factory(spec="apple-clang@9.1.0", operating_system="elcapitan")]
+ ):
+ s = spack.spec.Spec(pkg_name + constraint_str).concretized()
+ msg = f"Method {method_name} from {s} is giving a wrong result"
assert getattr(s.package, method_name)() == expected_result, msg