Mercurial > lcfOS
comparison test/grind.py @ 323:e9fe6988497c
Used burg for generating expressions
author | Windel Bouwman |
---|---|
date | Thu, 30 Jan 2014 19:03:24 +0100 |
parents | ff665880a6b0 |
children | 39bf68bf1891 |
comparison
equal
deleted
inserted
replaced
322:44f336460c2a | 323:e9fe6988497c |
---|---|
4 import unittest | 4 import unittest |
5 import pstats | 5 import pstats |
6 import sys | 6 import sys |
7 import os | 7 import os |
8 | 8 |
9 p = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'python') | |
10 sys.path.insert(0, p) | |
11 | |
9 if __name__ == '__main__': | 12 if __name__ == '__main__': |
10 suite = unittest.TestLoader().discover('.') | 13 suite = unittest.TestLoader().discover('.') |
11 def runtests(): | 14 def runtests(): |
12 unittest.TextTestRunner().run(suite) | 15 unittest.TextTestRunner().run(suite) |
13 #s = cProfile.run('runtests()',sort='cumtime') | 16 #s = cProfile.run('runtests()',sort='cumtime') |
14 s = cProfile.run('runtests()',sort='tottime') | 17 p = cProfile.Profile() |
18 s = p.run('runtests()') | |
19 stats = pstats.Stats(p) | |
20 stats.sort_stats('tottime') | |
21 stats.print_stats(.1) |