mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Basic test running added
This commit is contained in:
parent
9e05519660
commit
0984db5503
19
test/test.py
19
test/test.py
@ -29,4 +29,23 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
import sys
|
||||
sys.path.insert(0, 'src')
|
||||
sys.path.insert(0, 'test')
|
||||
|
||||
from fix import *
|
||||
|
||||
import sys
|
||||
import glob
|
||||
import os.path
|
||||
import unittest
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) > 1:
|
||||
names = sys.argv[1:]
|
||||
else:
|
||||
files = glob.glob(os.path.join('test', '*_test.py'))
|
||||
names = [os.path.splitext(os.path.basename(file))[0] for file in files]
|
||||
suite = unittest.defaultTestLoader.loadTestsFromNames(names)
|
||||
runner = unittest.TextTestRunner(verbosity=1)
|
||||
runner.run(suite)
|
||||
|
Loading…
Reference in New Issue
Block a user