From ffd6b7b2ec632920cbf9d413aa20d83d8333c87f Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Fri, 17 Aug 2012 23:32:47 -0400 Subject: * Show devmode in `bin/mailman info` output. (LP: #1035028) Also, allow doctest cleanups to be tuples, in which case the first item is the callable and the subsequent items are the arguments. Makes for config.pop()'ing much nicer. --- src/mailman/tests/test_documentation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mailman/tests/test_documentation.py') diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py index 329e0176a..b769f07d6 100644 --- a/src/mailman/tests/test_documentation.py +++ b/src/mailman/tests/test_documentation.py @@ -34,6 +34,8 @@ import sys import doctest import unittest +from inspect import isfunction, ismethod + import mailman from mailman.app.lifecycle import create_list @@ -169,7 +171,10 @@ def setup(testobj): def teardown(testobj): for cleanup in testobj.globs['cleanups']: - cleanup() + if isfunction(cleanup) or ismethod(cleanup): + cleanup() + else: + cleanup[0](*cleanup[1:]) -- cgit v1.2.3-70-g09d2