Mercurial > hg > MakeItSo
comparison makeitso/python_package/tests/test.py @ 124:3eee157f4564
correct syntax
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 19 May 2011 11:15:56 -0700 |
parents | 8db34885ebe4 |
children | 19ffc278e35c |
comparison
equal
deleted
inserted
replaced
123:8db34885ebe4 | 124:3eee157f4564 |
---|---|
25 tests = [ test for test in os.listdir(directory) | 25 tests = [ test for test in os.listdir(directory) |
26 if test.endswith('.txt') ] | 26 if test.endswith('.txt') ] |
27 | 27 |
28 # run the tests | 28 # run the tests |
29 for test in tests: | 29 for test in tests: |
30 results[test] = doctest.testfile(test, **doctest_args) | 30 try: |
31 except doctest.DocTestFailure, failure: | 31 results[test] = doctest.testfile(test, **doctest_args) |
32 raise | 32 except doctest.DocTestFailure, failure: |
33 except doctest.UnexpectedException, failure: | 33 raise |
34 raise failure.exc_info[0], failure.exc_info[1], failure.exc_info[2] | 34 except doctest.UnexpectedException, failure: |
35 raise failure.exc_info[0], failure.exc_info[1], failure.exc_info[2] | |
35 | 36 |
36 return results | 37 return results |
37 | 38 |
38 def main(args=sys.argv[1:]): | 39 def main(args=sys.argv[1:]): |
39 | 40 |