annotate profilemanager/tests/test.py @ 27:5988a15da3b4

things are being awful; checking in anyway
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 May 2010 16:47:12 -0700
parents a07e53273b70
children d4f0c1c4d0eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/usr/bin/env python
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 """
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4 doctest runner
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 """
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 import doctest
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 import os
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 def run_tests():
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11 directory = os.path.dirname(os.path.abspath(__file__))
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12 tests = [ test for test in os.listdir(directory)
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 if test.endswith('.txt') ]
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
14
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
15 for test in tests:
27
5988a15da3b4 things are being awful; checking in anyway
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
16 doctest.testfile(test, raise_on_error=True)
12
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
17
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
18 if __name__ == '__main__':
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
19 run_tests()
27
5988a15da3b4 things are being awful; checking in anyway
Jeff Hammel <jhammel@mozilla.com>
parents: 12
diff changeset
20