annotate profilemanager/tests/test.py @ 13:5f81f9d321ba

instantiate a profile manager in the tests with a stub profiles.ini file
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 May 2010 07:47:21 -0700
parents a07e53273b70
children 5988a15da3b4
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:
a07e53273b70 adding stubs for tests
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
16 doctest.testfile(test)
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()