Commit 9760c373 authored by eckhart's avatar eckhart
Browse files

test/run.py ammended

parent 3c92be00
......@@ -4,21 +4,42 @@
if __name__ == "__main__":
import os
import platform
scriptdir = os.path.dirname(os.path.realpath(__file__))
# if os.getcwd().endswith('test'):
# os.chdir('..')
# print("Running nosetests:")
# os.system("nosetests test")
if platform.system() != "Windows":
interpreters = ['python ', 'pypy3 ', 'python37 ']
else:
interpreters = [r'C:\Users\di68kap\AppData\Local\Programs\Python\Python37-32\python.exe ']
# interpreters = ['python ', 'pypy3 ', 'python37 ']
interpreters = [r'C:\Users\di68kap\AppData\Local\Programs\Python\Python37-32\python.exe ']
cwd = os.getcwd()
for interpreter in interpreters:
os.system(interpreter + '--version')
# unit tests
os.chdir(scriptdir)
assert os.getcwd().endswith('test')
files = os.listdir()
for filename in files:
if filename.startswith('test_'):
print('\nTEST ' + filename)
print('\nUNITTEST ' + filename)
os.system(interpreter + filename)
# doctests
os.chdir('..')
files = os.listdir('DHParser')
for filename in files:
if filename.endswith('.py'):
print('\nDOCTESTS in ' + filename)
os.system(interpreter + ' -m doctest ' + filename)
os.chdir(cwd)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment