From: Thomas Fillon Date: Thu, 7 Nov 2013 14:11:49 +0000 (+0100) Subject: Suppress collecting the doctest in the documentation .rst files because it does not... X-Git-Tag: 0.5.1-0~2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=590dea31046ef0bc87fc07dfbf815a1c473acdc3;p=timeside.git Suppress collecting the doctest in the documentation .rst files because it does not support Sphinx doctest fixtures. Add test_run_all_doctests to run_all_tests script --- diff --git a/tests/test_run_all_doctests.py b/tests/test_run_all_doctests.py old mode 100644 new mode 100755 index 47bc4b6..299f6ac --- a/tests/test_run_all_doctests.py +++ b/tests/test_run_all_doctests.py @@ -19,9 +19,7 @@ # Authors: # Thomas Fillon - - -import unittest +from unit_timeside import * import doctest import timeside import pkgutil @@ -34,17 +32,6 @@ def load_tests(loader, tests, ignore): finder = doctest.DocTestFinder(exclude_empty=False) - timeside_path = os.path.dirname(timeside.__path__[0]) - - # Create tests for doctest ReST files - rst_files = [] - for root, dirnames, filenames in os.walk(timeside_path): - for filename in fnmatch.filter(filenames, '*.rst'): - rst_files.append(os.path.join(root, filename)) - - for filename in rst_files: - tests.addTests(doctest.DocFileSuite(filename, module_relative=False)) - # Create tests for doctest in timeside modules and sub-modules modules_list = [modname for _, modname, _ in pkgutil.walk_packages( path=timeside.__path__, @@ -58,4 +45,4 @@ def load_tests(loader, tests, ignore): if __name__ == '__main__': - unittest.main() + unittest.main(testRunner=TestRunner())