From bf22eab6249200e16c091b69a2052fc14ef23a77 Mon Sep 17 00:00:00 2001 From: gwen Date: Tue, 1 Oct 2024 15:33:30 +0200 Subject: [PATCH] teardown --- tests/test_load.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_load.py b/tests/test_load.py index 848c8f8..da8bc92 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -22,6 +22,9 @@ dico_dirs = Path('../rougail/tests/dictionaries') #envtest = _here / 'tests' / 'envvars' #test_ok = [dico_dirs / env_test_folder] +#let's save the original environment +save = environ.copy() + test_ok = set() excludes = set() test_ok -= excludes @@ -34,6 +37,7 @@ test_ok = list(test_ok) test_ok.sort() + @fixture(scope="module", params=test_ok) def test_dir(request): return request.param @@ -77,6 +81,8 @@ def test_dictionaries_warning(test_dir): expected = load(json_file) # here is the effective test assert expected == config_dict + #teardown: set the original environement again + environ = save def populate(dest_dir, rougailconfig):