summaryrefslogtreecommitdiff
path: root/src/zope/configuration/tests/test_docs.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/zope/configuration/tests/test_docs.py')
-rw-r--r--src/zope/configuration/tests/test_docs.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/zope/configuration/tests/test_docs.py b/src/zope/configuration/tests/test_docs.py
index 3452e3b..f5283fd 100644
--- a/src/zope/configuration/tests/test_docs.py
+++ b/src/zope/configuration/tests/test_docs.py
@@ -20,7 +20,6 @@ from __future__ import division
from __future__ import print_function
import re
-import sys
import os.path
import unittest
import doctest
@@ -49,12 +48,15 @@ optionflags = (
)
def test_suite():
+ suite = unittest.TestSuite()
here = os.path.dirname(os.path.abspath(__file__))
while not os.path.exists(os.path.join(here, 'setup.py')):
prev, here = here, os.path.dirname(here)
if here == prev:
# Let's avoid infinite loops at root
- raise AssertionError('could not find my setup.py')
+ print('tests_doc.py: WARNING could not find setup.py -->'
+ ' omitting documentation tests.') # pragma: no cover
+ return suite # pragma: no cover
docs = os.path.join(here, 'docs')
api_docs = os.path.join(docs, 'api')
@@ -89,7 +91,6 @@ def test_suite():
m += manuel.codeblock.Manuel()
m += manuel.capture.Manuel()
- suite = unittest.TestSuite()
suite.addTest(
manuel.testing.TestSuite(
m,