Michael Merickel
2018-10-15 81576ee51564c49d5ff3c1c07f214f22a8438231
commit | author | age
05c7d3 1 import unittest
CM 2
3 if 0:
4     # no released version of manuel actually works with :lineno:
5     # settings yet
6     class ManuelDocsCase(unittest.TestCase):
7         def __new__(self, test):
8             return getattr(self, test)()
9
10         @classmethod
11         def test_docs(cls):
12             import os
13             import pkg_resources
14             import manuel.testing
15             import manuel.codeblock
16             import manuel.capture
17             import manuel.ignore
18             m = manuel.ignore.Manuel()
19             m += manuel.codeblock.Manuel()
20             m += manuel.capture.Manuel()
21             docs = []
22
5c1510 23             egg_path = pkg_resources.get_distribution('pyramid').location
05c7d3 24             path = os.path.join(egg_path, 'docs')
CM 25             for root, dirs, files in os.walk(path):
26                 for ignore in ('.svn', '.build', '.hg', '.git', 'CVS'):
27                     if ignore in dirs:
28                         dirs.remove(ignore)
29
30                 for filename in files:
31                     if filename.endswith('.rst'):
32                         docs.append(os.path.join(root, filename))
33
5cf9fc 34             print(path)
05c7d3 35             return manuel.testing.TestSuite(m, *docs)