diff --git a/requirements.txt b/requirements.txt index e85dd3416f..cc28e16ad4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ importlib_metadata==2.0.0 jsonschema==3.2.0 -pytest==6.1.1 +pytest==6.2.0 pytest-forked==1.3.0 pytest-parallel==0.1.0 coverage==5.3 diff --git a/unittests/test_cli.py b/unittests/test_cli.py index b084bada54..83226f39f7 100644 --- a/unittests/test_cli.py +++ b/unittests/test_cli.py @@ -671,6 +671,7 @@ def test_unuse_module_path(run_reframe, user_exec_ctx): config_file=fixtures.USER_CONFIG_FILE, action='run', system=rt.runtime().system.name ) + ms.searchpath_remove(module_path) assert "could not load module 'testmod_foo' correctly" in stdout assert 'Traceback' not in stderr assert returncode == 0 @@ -687,7 +688,6 @@ def test_use_module_path(run_reframe, user_exec_ctx): config_file=fixtures.USER_CONFIG_FILE, action='run', system=rt.runtime().system.name ) - assert 'Traceback' not in stdout assert 'Traceback' not in stderr assert "could not load module 'testmod_foo' correctly" not in stdout @@ -708,7 +708,6 @@ def test_overwrite_module_path(run_reframe, user_exec_ctx): config_file=fixtures.USER_CONFIG_FILE, action='run', system=rt.runtime().system.name ) - assert 'Traceback' not in stdout assert 'Traceback' not in stderr assert "could not load module 'testmod_foo' correctly" not in stdout diff --git a/unittests/test_utility.py b/unittests/test_utility.py index 2d2424a972..c1e8ae9f1d 100644 --- a/unittests/test_utility.py +++ b/unittests/test_utility.py @@ -1414,7 +1414,8 @@ def modules_system(user_exec_ctx, monkeypatch): ms = rt.runtime().system.modules_system ms.searchpath_add(fixtures.TEST_MODULES) - return ms + yield ms + ms.searchpath_remove(fixtures.TEST_MODULES) def test_find_modules(modules_system):