From 1da2cf6bbc64bfc624ea6fed9beb83d301f308d1 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 23 Aug 2012 03:33:06 +0900 Subject: fix ad0hoc testsuite runner --- src/leap/testing/test_basetest.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/leap/testing') diff --git a/src/leap/testing/test_basetest.py b/src/leap/testing/test_basetest.py index 4d98cd43..14d8f8a3 100644 --- a/src/leap/testing/test_basetest.py +++ b/src/leap/testing/test_basetest.py @@ -13,8 +13,10 @@ from leap.testing.basetest import BaseLeapTest _tempdir = None -class TestCaseRunner(object): - def run_testcase(self, testcase): +class _TestCaseRunner(object): + def run_testcase(self, testcase=None): + if not testcase: + return None loader = unittest.TestLoader() suite = loader.loadTestsFromTestCase(testcase) @@ -25,7 +27,7 @@ class TestCaseRunner(object): return results -class TestAbstractBaseLeapTest(unittest.TestCase, TestCaseRunner): +class TestAbstractBaseLeapTest(unittest.TestCase, _TestCaseRunner): def test_abstract_base_class(self): class _BaseTest(BaseLeapTest): @@ -60,7 +62,7 @@ class TestInitBaseLeapTest(BaseLeapTest): self.assertTrue(len(self.old_path) > 1) -class TestCleanedBaseLeapTest(unittest.TestCase, TestCaseRunner): +class TestCleanedBaseLeapTest(unittest.TestCase, _TestCaseRunner): def test_tempdir_is_cleaned_after_tests(self): class _BaseTest(BaseLeapTest): -- cgit v1.2.3