From 34f4bcbe606732c983ad2f971028e18bec2a971e Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Thu, 22 Oct 2020 17:28:57 +0200 Subject: [PATCH] tests/test.py: add config file for testing --- tests/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test.py b/tests/test.py index 64a05cc..c883362 100644 --- a/tests/test.py +++ b/tests/test.py @@ -11,6 +11,7 @@ from pathlib import Path from typing import List import unittest import sys + sys.path.insert(0, str(Path(__file__).parents[1].resolve())) @@ -30,12 +31,12 @@ def get_ignored_files() -> List[str]: # Loading every python file in this folder list_mod = [str(mfile.relative_to(Path(__file__).resolve().parents[1])) - for mfile in list((Path(__file__).resolve().parents[1] / "src").rglob('*.py'))] + for mfile in + list((Path(__file__).resolve().parents[1] / "src").rglob('*.py'))] list_mod2 = [m.replace('.py', '').replace('/', '.') for m in list_mod if '__init__' not in m and '__main__' not in m - and 'test' not in m - and 'config' not in m] + and 'test' not in m] final_mod = [mod for mod in list_mod2 if mod not in get_ignored_files()] @@ -46,4 +47,4 @@ def load_tests(loader, tests, ignore): if __name__ == "__main__": - unittest.main() \ No newline at end of file + unittest.main() -- GitLab