summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2019-12-29 02:16:14 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2019-12-30 13:01:31 -0800
commite8394324720aa6bb041e3dddba46faa14626bd85 (patch)
tree32f2bf34667d9d4b77222221de62236904e33af8 /lib
parent8e8235043d6f4605f338761233178404840baae5 (diff)
downloadspack-e8394324720aa6bb041e3dddba46faa14626bd85.tar.gz
spack-e8394324720aa6bb041e3dddba46faa14626bd85.tar.bz2
spack-e8394324720aa6bb041e3dddba46faa14626bd85.tar.xz
spack-e8394324720aa6bb041e3dddba46faa14626bd85.zip
tests: make env tests that use configs non-destructive
Environment tests pushed config scopes but didn't properly remove them. - [x] use `with env:` context manager instead of `env.prepare_config_scopes()`
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/cmd/env.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py
index 654611565e..fa7f9a640e 100644
--- a/lib/spack/spack/test/cmd/env.py
+++ b/lib/spack/spack/test/cmd/env.py
@@ -406,8 +406,8 @@ env:
_env_create('test', StringIO(test_config))
e = ev.read('test')
- ev.prepare_config_scope(e)
- e.concretize()
+ with e:
+ e.concretize()
assert any(x.satisfies('mpileaks@2.2')
for x in e._get_environment_specs())
@@ -431,8 +431,8 @@ packages:
version: [2.2]
""")
- ev.prepare_config_scope(e)
- e.concretize()
+ with e:
+ e.concretize()
assert any(x.satisfies('mpileaks@2.2')
for x in e._get_environment_specs())
@@ -460,8 +460,8 @@ packages:
version: [2.2]
""")
- ev.prepare_config_scope(e)
- e.concretize()
+ with e:
+ e.concretize()
assert any(x.satisfies('mpileaks@2.2')
for x in e._get_environment_specs())
@@ -490,8 +490,8 @@ packages:
version: [0.8.11]
""")
- ev.prepare_config_scope(e)
- e.concretize()
+ with e:
+ e.concretize()
# ensure included scope took effect
assert any(
@@ -530,8 +530,8 @@ packages:
version: [0.8.12]
""")
- ev.prepare_config_scope(e)
- e.concretize()
+ with e:
+ e.concretize()
assert any(
x.satisfies('mpileaks@2.2') for x in e._get_environment_specs())