generic tests
This commit is contained in:
parent
040fc2396c
commit
a66db76ef8
1 changed files with 20 additions and 4 deletions
|
@ -1,10 +1,12 @@
|
||||||
from .custom import CustomOption
|
from .custom import CustomOption
|
||||||
|
|
||||||
from pathlib import Path
|
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
|
import json
|
||||||
|
|
||||||
from pytest import fixture
|
from pytest import fixture, raises
|
||||||
from ruamel.yaml import YAML
|
from ruamel.yaml import YAML
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
|
@ -13,9 +15,23 @@ from rougail.user_data_environment.data import RougailUserDataEnvironment
|
||||||
|
|
||||||
|
|
||||||
dico_dirs = Path('../rougail/tests/dictionaries')
|
dico_dirs = Path('../rougail/tests/dictionaries')
|
||||||
env_test_folder = '00_6string'
|
#env_test_folder = '00_6string'
|
||||||
test_ok = [dico_dirs / env_test_folder]
|
|
||||||
|
|
||||||
|
# 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)
|
@fixture(scope="module", params=test_ok)
|
||||||
def test_dir(request):
|
def test_dir(request):
|
||||||
|
|
Loading…
Reference in a new issue