source: products/qPloneGoogleSitemaps/tags/0.8/tests/runalltests.py

Last change on this file was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 647 bytes
Line 
1#
2# Runs all tests in the current directory
3#
4# Execute like:
5#   python runalltests.py
6#
7# Alternatively use the testrunner:
8#   python /path/to/Zope/utilities/testrunner.py -qa
9#
10
11import os, sys
12if __name__ == '__main__':
13    execfile(os.path.join(sys.path[0], 'framework.py')) 
14
15import unittest
16TestRunner = unittest.TextTestRunner
17suite = unittest.TestSuite()
18
19tests = os.listdir(os.curdir)
20tests = [n[:-3] for n in tests if n.startswith('test') and n.endswith('.py')]
21
22for test in tests:
23    m = __import__(test)
24    if hasattr(m, 'test_suite'):
25        suite.addTest(m.test_suite())
26
27if __name__ == '__main__':
28    TestRunner().run(suite)
29
Note: See TracBrowser for help on using the repository browser.