diff options
Diffstat (limited to 'lib/spack/spack/test/multimethod.py')
-rw-r--r-- | lib/spack/spack/test/multimethod.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/spack/spack/test/multimethod.py b/lib/spack/spack/test/multimethod.py index e4546c5139..0ab26060c6 100644 --- a/lib/spack/spack/test/multimethod.py +++ b/lib/spack/spack/test/multimethod.py @@ -69,9 +69,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 |