diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-09-14 19:23:47 +0200 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-11-17 10:04:13 -0800 |
commit | 2595b58503f390dab2b4a53791afcfef36e214b2 (patch) | |
tree | 7827c01179a31985a2d8f46bca2b7d7cedcc72d8 /lib | |
parent | aaa75b831fc1dbac5e17841b0d89c3faa9dfd419 (diff) | |
download | spack-2595b58503f390dab2b4a53791afcfef36e214b2.tar.gz spack-2595b58503f390dab2b4a53791afcfef36e214b2.tar.bz2 spack-2595b58503f390dab2b4a53791afcfef36e214b2.tar.xz spack-2595b58503f390dab2b4a53791afcfef36e214b2.zip |
test_noversion_pkg: generalized the error to be caught
The new concretizer and the old concretizer solve constraints
in a different way. Here we ensure that a SpackError is raised,
instead of a specific error that made sense in the old concretizer
but probably not in the new.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/test/concretize.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index dcfaf31bdd..72f8632ad2 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -13,7 +13,7 @@ import spack.concretize import spack.repo from spack.concretize import find_spec, NoValidVersionError -from spack.error import SpecError +from spack.error import SpecError, SpackError from spack.spec import Spec, CompilerSpec, ConflictsInSpecError from spack.version import ver from spack.util.mock_package import MockPackageMultiRepo @@ -608,7 +608,7 @@ class TestConcretize(object): @pytest.mark.parametrize('spec', ['noversion', 'noversion-bundle']) def test_noversion_pkg(self, spec): """Test concretization failures for no-version packages.""" - with pytest.raises(NoValidVersionError, match="no valid versions"): + with pytest.raises(SpackError): Spec(spec).concretized() @pytest.mark.parametrize('spec, best_achievable', [ |