summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2020-03-22 09:26:30 -0500
committerJason Madden <jamadden@gmail.com>2020-03-22 09:26:30 -0500
commit909f4cc7c1f7362dc697426af77a7843a04a1fe4 (patch)
tree3f4cf599c9e74437f81a7e7f353756faebebff5a
parentedece6949e2cc0e39f5b6052e3b11ebb3484797f (diff)
downloadzope-configuration-909f4cc7c1f7362dc697426af77a7843a04a1fe4.tar.gz
Add py38 to tox.ini, and make unittest run our explicit doctests like zope.testrunner.
-rw-r--r--src/zope/configuration/tests/test___init__.py5
-rw-r--r--src/zope/configuration/tests/test_docs.py6
-rw-r--r--src/zope/configuration/tests/test_docutils.py7
-rw-r--r--src/zope/configuration/tests/test_fields.py3
-rw-r--r--src/zope/configuration/tests/test_zopeconfigure.py5
-rw-r--r--tox.ini2
6 files changed, 7 insertions, 21 deletions
diff --git a/src/zope/configuration/tests/test___init__.py b/src/zope/configuration/tests/test___init__.py
index 92c5da0..d86faa8 100644
--- a/src/zope/configuration/tests/test___init__.py
+++ b/src/zope/configuration/tests/test___init__.py
@@ -29,8 +29,3 @@ class Test_namespace(unittest.TestCase):
def test_non_empty(self):
self.assertEqual(self._callFUT('test'),
'http://namespaces.zope.org/test')
-
-def test_suite():
- return unittest.TestSuite((
- unittest.makeSuite(Test_namespace),
- ))
diff --git a/src/zope/configuration/tests/test_docs.py b/src/zope/configuration/tests/test_docs.py
index f81de55..4d10540 100644
--- a/src/zope/configuration/tests/test_docs.py
+++ b/src/zope/configuration/tests/test_docs.py
@@ -48,6 +48,7 @@ optionflags = (
)
def test_suite():
+ # zope.testrunner
suite = unittest.TestSuite()
here = os.path.dirname(os.path.abspath(__file__))
while not os.path.exists(os.path.join(here, 'setup.py')):
@@ -115,3 +116,8 @@ def test_suite():
)
return suite
+
+
+def load_tests(loader, standard_tests, pattern):
+ # Pure unittest protocol.
+ return test_suite()
diff --git a/src/zope/configuration/tests/test_docutils.py b/src/zope/configuration/tests/test_docutils.py
index 1b69874..7583369 100644
--- a/src/zope/configuration/tests/test_docutils.py
+++ b/src/zope/configuration/tests/test_docutils.py
@@ -121,10 +121,3 @@ class Test_makeDocStructures(unittest.TestCase):
(NS, 'three', ISchema, _three, 'THREE')])
self.assertEqual(subdirs[(PNS, 'parent2')],
[(NS2, 'two', ISchema, _two, 'TWO')])
-
-
-def test_suite():
- return unittest.TestSuite((
- unittest.makeSuite(Test_wrap),
- unittest.makeSuite(Test_makeDocStructures),
- ))
diff --git a/src/zope/configuration/tests/test_fields.py b/src/zope/configuration/tests/test_fields.py
index baa4023..bbcc7f0 100644
--- a/src/zope/configuration/tests/test_fields.py
+++ b/src/zope/configuration/tests/test_fields.py
@@ -319,6 +319,3 @@ class MessageIDTests(unittest.TestCase, _ConformsToIFromUnicode):
msgid = bound.fromUnicode(u'msgid')
self.assertIsInstance(msgid.domain, str)
self.assertEqual(msgid.domain, 'domain')
-
-def test_suite():
- return unittest.defaultTestLoader.loadTestsFromName(__name__)
diff --git a/src/zope/configuration/tests/test_zopeconfigure.py b/src/zope/configuration/tests/test_zopeconfigure.py
index ac7870f..92575f2 100644
--- a/src/zope/configuration/tests/test_zopeconfigure.py
+++ b/src/zope/configuration/tests/test_zopeconfigure.py
@@ -38,8 +38,3 @@ class ZopeConfigureTests(unittest.TestCase):
class Context(object):
basepath = None
-
-def test_suite():
- return unittest.TestSuite((
- unittest.makeSuite(ZopeConfigureTests),
- ))
diff --git a/tox.ini b/tox.ini
index 6f373e6..8f388ae 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist =
- py27,py35,py36,py37,pypy,pypy3,coverage,docs
+ py27,py35,py36,py37,py38,pypy,pypy3,coverage,docs
[testenv]
usedevelop = true