annotate test/run_tests.py @ 408:ad6be5454067

Added image build task
author Windel Bouwman
date Sat, 21 Feb 2015 12:17:47 +0100
parents fc1b89b09896
children
rev   line source
373
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
1 import sys
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
2 import unittest
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
3
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
4 if sys.version_info.major < 3:
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
5 print('Requires python 3 at least')
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
6 sys.exit()
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
7
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
8 sys.path.insert(0, '../python')
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
9
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
10 loader = unittest.TestLoader()
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
11 suite = unittest.TestSuite()
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
12
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
13 for test in loader.discover('.'):
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
14 suite.addTest(test)
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
15
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
16 unittest.TextTestRunner().run(suite)
fc1b89b09896 Added run test.py
Windel Bouwman
parents:
diff changeset
17