teardown
This commit is contained in:
parent
d9b76e3bf2
commit
bf22eab624
1 changed files with 6 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue