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()`
This commit is contained in:
parent
8e8235043d
commit
e839432472
1 changed files with 10 additions and 10 deletions
|
@ -406,7 +406,7 @@ def test_env_with_config():
|
|||
_env_create('test', StringIO(test_config))
|
||||
|
||||
e = ev.read('test')
|
||||
ev.prepare_config_scope(e)
|
||||
with e:
|
||||
e.concretize()
|
||||
|
||||
assert any(x.satisfies('mpileaks@2.2')
|
||||
|
@ -431,7 +431,7 @@ def test_env_with_included_config_file():
|
|||
version: [2.2]
|
||||
""")
|
||||
|
||||
ev.prepare_config_scope(e)
|
||||
with e:
|
||||
e.concretize()
|
||||
|
||||
assert any(x.satisfies('mpileaks@2.2')
|
||||
|
@ -460,7 +460,7 @@ def test_env_with_included_config_scope():
|
|||
version: [2.2]
|
||||
""")
|
||||
|
||||
ev.prepare_config_scope(e)
|
||||
with e:
|
||||
e.concretize()
|
||||
|
||||
assert any(x.satisfies('mpileaks@2.2')
|
||||
|
@ -490,7 +490,7 @@ def test_env_config_precedence():
|
|||
version: [0.8.11]
|
||||
""")
|
||||
|
||||
ev.prepare_config_scope(e)
|
||||
with e:
|
||||
e.concretize()
|
||||
|
||||
# ensure included scope took effect
|
||||
|
@ -530,7 +530,7 @@ def test_included_config_precedence():
|
|||
version: [0.8.12]
|
||||
""")
|
||||
|
||||
ev.prepare_config_scope(e)
|
||||
with e:
|
||||
e.concretize()
|
||||
|
||||
assert any(
|
||||
|
|
Loading…
Reference in a new issue