This commit is contained in:
Remi Ehounou
2021-09-11 00:46:56 -04:00
parent 8085dde0b0
commit 3ce33b3a50
43 changed files with 966 additions and 119 deletions

21
tests/test_funcs.py Normal file
View File

@@ -0,0 +1,21 @@
import unittest
import os
import importlib.util as utl
from MDAF.TestFunctions import *
import doctest
# Testing the test function representation workflow
def load_tests(loader, tests, ignore):
fullpath = 'MDAF/TestFunctions'
for func in os.scandir(fullpath):
name = str(func.name)
if(name.find('.py') and name.find('.old') == -1 and func.is_file() and name.find('__init__.py')==-1):
spec = utl.spec_from_file_location(name[-3], fullpath+'/'+name)
funcmodule = utl.module_from_spec(spec)
spec.loader.exec_module(funcmodule)
tests.addTests(doctest.DocTestSuite(funcmodule))
return tests