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 |
0c29cf
|
18 |
|
05c7d3
|
19 |
m = manuel.ignore.Manuel() |
CM |
20 |
m += manuel.codeblock.Manuel() |
|
21 |
m += manuel.capture.Manuel() |
|
22 |
docs = [] |
|
23 |
|
5c1510
|
24 |
egg_path = pkg_resources.get_distribution('pyramid').location |
05c7d3
|
25 |
path = os.path.join(egg_path, 'docs') |
CM |
26 |
for root, dirs, files in os.walk(path): |
|
27 |
for ignore in ('.svn', '.build', '.hg', '.git', 'CVS'): |
|
28 |
if ignore in dirs: |
|
29 |
dirs.remove(ignore) |
|
30 |
|
|
31 |
for filename in files: |
|
32 |
if filename.endswith('.rst'): |
|
33 |
docs.append(os.path.join(root, filename)) |
|
34 |
|
5cf9fc
|
35 |
print(path) |
05c7d3
|
36 |
return manuel.testing.TestSuite(m, *docs) |