summaryrefslogtreecommitdiff
path: root/tests/test_docs.py
diff options
context:
space:
mode:
authorMichael Merickel <github@m.merickel.org>2018-10-15 09:03:53 -0500
committerGitHub <noreply@github.com>2018-10-15 09:03:53 -0500
commit81576ee51564c49d5ff3c1c07f214f22a8438231 (patch)
tree5b3fe0b39a0fc33d545733d821738845909f638c /tests/test_docs.py
parent433efe06191a7007ca8c5bf8fafee5c7c1439ebb (diff)
parent17e3abf320f6d9cd90f7e5a0352280c2fef584af (diff)
downloadpyramid-81576ee51564c49d5ff3c1c07f214f22a8438231.tar.gz
pyramid-81576ee51564c49d5ff3c1c07f214f22a8438231.tar.bz2
pyramid-81576ee51564c49d5ff3c1c07f214f22a8438231.zip
Merge pull request #3387 from mmerickel/src-folder-refactor
refactor pyramid tests into a tests folder and package into a src folder
Diffstat (limited to 'tests/test_docs.py')
-rw-r--r--tests/test_docs.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/test_docs.py b/tests/test_docs.py
new file mode 100644
index 000000000..0735a494a
--- /dev/null
+++ b/tests/test_docs.py
@@ -0,0 +1,35 @@
+import unittest
+
+if 0:
+ # no released version of manuel actually works with :lineno:
+ # settings yet
+ class ManuelDocsCase(unittest.TestCase):
+ def __new__(self, test):
+ return getattr(self, test)()
+
+ @classmethod
+ def test_docs(cls):
+ import os
+ import pkg_resources
+ import manuel.testing
+ import manuel.codeblock
+ import manuel.capture
+ import manuel.ignore
+ m = manuel.ignore.Manuel()
+ m += manuel.codeblock.Manuel()
+ m += manuel.capture.Manuel()
+ docs = []
+
+ egg_path = pkg_resources.get_distribution('pyramid').location
+ path = os.path.join(egg_path, 'docs')
+ for root, dirs, files in os.walk(path):
+ for ignore in ('.svn', '.build', '.hg', '.git', 'CVS'):
+ if ignore in dirs:
+ dirs.remove(ignore)
+
+ for filename in files:
+ if filename.endswith('.rst'):
+ docs.append(os.path.join(root, filename))
+
+ print(path)
+ return manuel.testing.TestSuite(m, *docs)