annotate test/run_tests.py @ 394:988f3fb861e4

c3 code generator rewrite
author Windel Bouwman
date Thu, 22 May 2014 08:14:12 +0200
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