Changeset 284 for trunk/test
- Timestamp:
- 11/24/08 12:41:22 (20 months ago)
- Files:
-
- 1 modified
-
trunk/test/suite.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/suite.py
r267 r284 3 3 from ambidjangolib.test.simple import DocTestRunner 4 4 5 def build_doctest_suite(module):6 return doctest.DocTestSuite(module,7 checker=doctestOutputChecker,8 runner=DocTestRunner,9 optionflags=doctest.REPORT_ONLY_FIRST_FAILURE)10 11 5 def build_for_doctests(*module_paths, **kwargs): 6 kwargs.setdefault('checker', doctestOutputChecker) 7 kwargs.setdefault('runner', DocTestRunner) 8 kwargs.setdefault('optionflags', doctest.REPORT_ONLY_FIRST_FAILURE) 12 9 def suite_func(): 13 10 suite = TestSuite() … … 16 13 for submodule_name in module_path.split('.')[1:]: 17 14 module = getattr(module, submodule_name) 18 suite.addTest( build_doctest_suite(module))15 suite.addTest(doctest.DocTestSuite(module, **kwargs)) 19 16 return suite 20 17 return suite_func
