Tweak a unit test by allowing a different type of exception to be raised

This commit is contained in:
Massimiliano Culpo 2023-06-21 18:01:06 +02:00 committed by Todd Gamblin
parent b7cc4bd247
commit e25dcf73cd

View File

@ -14,7 +14,7 @@
import spack.repo
import spack.util.spack_yaml as syaml
import spack.version
from spack.solver.asp import UnsatisfiableSpecError
from spack.solver.asp import InternalConcretizerError, UnsatisfiableSpecError
from spack.spec import Spec
from spack.util.url import path_to_file_url
@ -716,7 +716,8 @@ def test_incompatible_virtual_requirements_raise(concretize_scope, mock_packages
update_packages_config(conf_str)
spec = Spec("callpath ^zmpi")
with pytest.raises(UnsatisfiableSpecError):
# TODO (multiple nodes): recover a better error message later
with pytest.raises((UnsatisfiableSpecError, InternalConcretizerError)):
spec.concretize()