remove tmp directory if exists

This commit is contained in:
egarette@silique.fr 2023-01-07 21:37:23 +01:00
parent f91132fc61
commit 9a9a25dcce

View file

@ -4,6 +4,7 @@ from pytest import fixture, raises
from os import listdir, environ, makedirs from os import listdir, environ, makedirs
from json import load, dumps, loads from json import load, dumps, loads
from yaml import dump as ydump from yaml import dump as ydump
from shutil import rmtree
environ['TIRAMISU_LOCALE'] = 'en' environ['TIRAMISU_LOCALE'] = 'en'
@ -14,6 +15,11 @@ from rougail.error import DictConsistencyError
dico_dirs = 'tests/dictionaries' dico_dirs = 'tests/dictionaries'
# if test_3_template.py failed, this temporary directory must be removed
tmp_dir = join(dico_dirs, 'tmp')
if isdir(tmp_dir):
rmtree(tmp_dir)
test_ok = set() test_ok = set()
test_raise = set() test_raise = set()