From 3670c2cdb732d378ba6d38e72e7cd875ff726aa9 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 14 Oct 2018 21:11:41 -0500 Subject: move tests out of the package --- tests/test_docs.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/test_docs.py (limited to 'tests/test_docs.py') 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) -- cgit v1.2.3