diff options
Diffstat (limited to 'lib/spack/spack/test/concretize.py')
-rw-r--r-- | lib/spack/spack/test/concretize.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/spack/spack/test/concretize.py b/lib/spack/spack/test/concretize.py index f23c20fd6e..989699bbf3 100644 --- a/lib/spack/spack/test/concretize.py +++ b/lib/spack/spack/test/concretize.py @@ -152,13 +152,10 @@ class TestConcretize(object): with pytest.raises(spack.concretize.UnavailableCompilerVersionError): check_concretize('dttop %gcc@100.100') - try: - spack.concretizer.disable_compiler_existence_check() + with spack.concretize.disable_compiler_existence_check(): spec = check_concretize('dttop %gcc@100.100') assert spec.satisfies('%gcc@100.100') assert spec['dtlink3'].satisfies('%gcc@100.100') - finally: - spack.concretizer.enable_compiler_existence_check() def test_concretize_with_provides_when(self): """Make sure insufficient versions of MPI are not in providers list when |