[bridgedb/develop] Change bridgedb.test.util.TestCaseMixin to be a bridgedb.util.mixin.

commit 207cec93a3fcb3f3f18eb0e817cb43cf0d82bd9d Author: Isis Lovecruft <isis@torproject.org> Date: Thu Jul 3 14:14:44 2014 +0000 Change bridgedb.test.util.TestCaseMixin to be a bridgedb.util.mixin. --- lib/bridgedb/test/util.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/bridgedb/test/util.py b/lib/bridgedb/test/util.py index ca68d1d..3bc2e56 100644 --- a/lib/bridgedb/test/util.py +++ b/lib/bridgedb/test/util.py @@ -14,7 +14,6 @@ from __future__ import print_function from __future__ import unicode_literals -import abc import doctest import os @@ -22,6 +21,8 @@ from functools import wraps from twisted.trial import unittest +from bridgedb import util as bdbutil + def fileCheckDecorator(func): """Method decorator for a t.t.unittest.TestCase test_* method. @@ -66,9 +67,11 @@ def fileCheckDecorator(func): return wrapper -class TestCaseMixin: - """Subclasses of me can be used as mix-in classes with ``TestCase``s.""" - __metaclass__ = abc.ABCMeta +#: Mixin class for use with :api:`~twisted.trial.unittest.TestCase`. A +#: ``TestCaseMixin`` can be used to add additional methods, which should be +#: common to multiple ``TestCase`` subclasses, without the ``TestCaseMixin`` +#: being run as a ``TestCase`` by ``twisted.trial``. +TestCaseMixin = bdbutil.mixin TestCaseMixin.register(unittest.TestCase)
participants (1)
-
isis@torproject.org