]> git.parisson.com Git - timeside.git/commitdiff
Suppress collecting the doctest in the documentation .rst files because it does not...
authorThomas Fillon <thomas@parisson.com>
Thu, 7 Nov 2013 14:11:49 +0000 (15:11 +0100)
committerThomas Fillon <thomas@parisson.com>
Thu, 7 Nov 2013 14:11:49 +0000 (15:11 +0100)
tests/test_run_all_doctests.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 47bc4b6..299f6ac
@@ -19,9 +19,7 @@
 
 # Authors:
 #   Thomas Fillon <thomas  at parisson.com>
-
-
-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())