Mercurial > hg > MakeItSo
comparison examples/test.py @ 35:7e47ff4b0cd3
started writing tests; what a surprise, everything is broken ;)
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sat, 01 Jan 2011 21:58:34 -0800 |
parents | |
children | 6b4c8f23192f |
comparison
equal
deleted
inserted
replaced
34:46c2d0a7335a | 35:7e47ff4b0cd3 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 """ | |
4 doctest runner | |
5 """ | |
6 | |
7 import doctest | |
8 import os | |
9 | |
10 def run_tests(): | |
11 directory = os.path.dirname(os.path.abspath(__file__)) | |
12 extraglobs = {'here': directory} | |
13 tests = [ 'doctest.txt' ] | |
14 for test in tests: | |
15 doctest.testfile(test, extraglobs=extraglobs, raise_on_error=False) | |
16 | |
17 if __name__ == '__main__': | |
18 run_tests() |