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.
This commit is contained in:
parent
aaa75b831f
commit
2595b58503
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@
|
|||
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 @@ def test_simultaneous_concretization_of_specs(self, abstract_specs):
|
|||
@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', [
|
||||
|
|
Loading…
Reference in a new issue