diff options
author | Michael Howitz <mh@gocept.com> | 2019-02-12 08:24:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-12 08:24:11 +0100 |
commit | 9552d08bfcf097fa692ee9ae77f1b092e71807ac (patch) | |
tree | 0d372e5ea7ec7541008eb527f90801b2ac67c25f | |
parent | e2939ad20707515fc0b1bc78102b338116dfacbf (diff) | |
parent | 49260bec3aa4eeeb151da93e1c810dfccfcab33c (diff) | |
download | zope-configuration-9552d08bfcf097fa692ee9ae77f1b092e71807ac.tar.gz |
Merge pull request #46 from zopefoundation/fix-ztk-tests
Do not break when running the tests from a wheel.
-rw-r--r-- | CHANGES.rst | 2 | ||||
-rw-r--r-- | src/zope/configuration/tests/test_docs.py | 13 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 40be6a9..9afff86 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changes 4.3.1 (unreleased) ------------------ -- Nothing changed yet. +- Do not break when running the tests from a wheel. 4.3.0 (2018-10-01) diff --git a/src/zope/configuration/tests/test_docs.py b/src/zope/configuration/tests/test_docs.py index 3452e3b..f81de55 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,21 @@ 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') + class SkippedDocTests(unittest.TestCase): # pragma: no cover + + @unittest.skip('Could not find setup.py') + def test_docs(self): + pass + + suite.addTest( + unittest.makeSuite(SkippedDocTests)) # pragma: no cover + return suite # pragma: no cover docs = os.path.join(here, 'docs') api_docs = os.path.join(docs, 'api') @@ -89,7 +97,6 @@ def test_suite(): m += manuel.codeblock.Manuel() m += manuel.capture.Manuel() - suite = unittest.TestSuite() suite.addTest( manuel.testing.TestSuite( m, @@ -14,7 +14,7 @@ basepython = python3.6 commands = coverage run -m zope.testrunner --test-path=src --all - coverage report --fail-under=100 + coverage report --show-missing --skip-covered --fail-under=100 deps = {[testenv]deps} coverage |