]> git.ozlabs.org Git - patchwork/commitdiff
tests: Support execution of single tests
authorDirk Wallenstein <halsmit@t-online.de>
Wed, 16 Feb 2011 08:41:30 +0000 (08:41 +0000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 28 Feb 2011 01:54:15 +0000 (09:54 +0800)
Django does not use suite() when executing single tests.  Importing all
tests directly into __init__.py has the same effect as the replaced
version of suite().

Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
apps/patchwork/tests/__init__.py

index 5ec3923797233de4d5bc96e4fbb5802e0d2c8332..57e15cdb2cee3caf1fed8b78ac1159c7859e284c 100644 (file)
 # along with Patchwork; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-import unittest
-from patchwork.tests import patchparser, encodings, bundles, mboxviews, updates
-
-modules = [patchparser, encodings, bundles, mboxviews, updates]
-
-def suite():
-    suite = unittest.TestSuite()
-    loader = unittest.TestLoader()
-
-    for module in modules:
-        tests = loader.loadTestsFromModule(module)
-        suite.addTests(tests)
-
-    return suite
+from patchwork.tests.patchparser import *
+from patchwork.tests.encodings import *
+from patchwork.tests.bundles import *
+from patchwork.tests.mboxviews import *
+from patchwork.tests.updates import *