diff --git a/tests/test_load.py b/tests/test_load.py index 5add669..ecf3780 100644 --- a/tests/test_load.py +++ b/tests/test_load.py @@ -1,10 +1,12 @@ from .custom import CustomOption from pathlib import Path -import os +from os import getcwd, listdir, environ, makedirs +from os.path import isfile, join, isdir, dirname +from pathlib import Path import json -from pytest import fixture +from pytest import fixture, raises from ruamel.yaml import YAML from dotenv import load_dotenv @@ -13,9 +15,23 @@ from rougail.user_data_environment.data import RougailUserDataEnvironment dico_dirs = Path('../rougail/tests/dictionaries') -env_test_folder = '00_6string' -test_ok = [dico_dirs / env_test_folder] +#env_test_folder = '00_6string' +# path configuration +_here = Path(__file__).resolve().parent +envtest = _here / 'tests' / 'envvars' + +test_ok = set() +test_raise = set() +for test in listdir(dico_dirs): + if isdir(join(envtest, test)): + test_ok.add(test) + elif test != '__pycache__': + test_raise.add(test) + +#test_ok = [dico_dirs / env_test_folder] +excludes = set() +test_ok -= excludes @fixture(scope="module", params=test_ok) def test_dir(request):