From 6ce0cba3c72332bfb0c2ef092bdea6a4273be435 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 29 Aug 2010 19:34:38 +1000 Subject: [PATCH] Changed the test setup for easier sub-test running. I was creating my own unittest.TestSuite, but this appears (from reading the Django code) to not be necessary. Auto-discovery takes place if I import the TestCase instances into the "acacia.tests" namespace and then I can restrict test runs to invidivual TestCases. --- acacia/tests/__init__.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/acacia/tests/__init__.py b/acacia/tests/__init__.py index 50ffd4b..1b70630 100644 --- a/acacia/tests/__init__.py +++ b/acacia/tests/__init__.py @@ -1,10 +1,4 @@ -import unittest - -from acacia.tests import test_models, test_templatetags - -def suite(): - test_suite = unittest.defaultTestLoader.loadTestsFromModule(test_models) - test_suite.addTests(unittest.defaultTestLoader. \ - loadTestsFromModule(test_templatetags)) - return test_suite +from acacia.tests.test_models import TopicTest +from acacia.tests.test_templatetags import (TreeTrunkErrorTests, + TreeTrunkMiscTests, TreeTrunkSingleRootTests, TreeTrunkFullContentTests)