From 275748b9ca16ae16fdb0d6fc89dcdb4b2a0b2a35 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Tue, 27 Aug 2013 20:47:21 -0400 Subject: * Suppress the extra Doctest: lines. * Use DocFileTest directly. --- src/mailman/testing/nose.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mailman/testing/nose.py b/src/mailman/testing/nose.py index 96b92a0d7..301f03aae 100644 --- a/src/mailman/testing/nose.py +++ b/src/mailman/testing/nose.py @@ -89,12 +89,12 @@ class NosePlugin(Plugin): layer = SMTPLayer else: layer = getattr(module, 'layer', SMTPLayer) - suite = doctest.DocFileSuite( + test = doctest.DocFileTest( path, package='mailman', optionflags=FLAGS, setUp=setup, tearDown=teardown) - # Flatten the suite, adding the layer flag on every TestCase. - for test in suite: - test.layer = layer - event.extraTests.append(test) + test.layer = layer + # Suppress the extra "Doctest: ..." line. + test.shortDescription = lambda: None + event.extraTests.append(test) -- cgit v1.3.1