summaryrefslogtreecommitdiff
path: root/test/py/tests/test_env.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py/tests/test_env.py')
-rw-r--r--test/py/tests/test_env.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
index a3e8dd3..557c3af 100644
--- a/test/py/tests/test_env.py
+++ b/test/py/tests/test_env.py
@@ -77,11 +77,15 @@ class StateTestEnv(object):
return var
n += 1
-@pytest.fixture(scope='module')
+ste = None
+@pytest.fixture(scope='function')
def state_test_env(u_boot_console):
'''pytest fixture to provide a StateTestEnv object to tests.'''
- return StateTestEnv(u_boot_console)
+ global ste
+ if not ste:
+ ste = StateTestEnv(u_boot_console)
+ return ste
def unset_var(state_test_env, var):
'''Unset an environment variable.