Loading django/test/testcases.py +4 −1 Original line number Diff line number Diff line Loading @@ -524,7 +524,10 @@ class TransactionTestCase(ut2.TestCase): context.__enter__() try: func(*args, **kwargs) finally: except: context.__exit__(*sys.exc_info()) raise else: context.__exit__(*sys.exc_info()) def connections_support_transactions(): Loading tests/regressiontests/test_utils/tests.py +8 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,14 @@ if sys.version_info >= (2, 5): class SkippingTestCase(TestCase): def test_assert_num_queries(self): def test_func(): raise ValueError self.assertRaises(ValueError, self.assertNumQueries, 2, test_func ) def test_skip_unless_db_feature(self): "A test that might be skipped is actually called." # Total hack, but it works, just want an attribute that's always true. Loading Loading
django/test/testcases.py +4 −1 Original line number Diff line number Diff line Loading @@ -524,7 +524,10 @@ class TransactionTestCase(ut2.TestCase): context.__enter__() try: func(*args, **kwargs) finally: except: context.__exit__(*sys.exc_info()) raise else: context.__exit__(*sys.exc_info()) def connections_support_transactions(): Loading
tests/regressiontests/test_utils/tests.py +8 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,14 @@ if sys.version_info >= (2, 5): class SkippingTestCase(TestCase): def test_assert_num_queries(self): def test_func(): raise ValueError self.assertRaises(ValueError, self.assertNumQueries, 2, test_func ) def test_skip_unless_db_feature(self): "A test that might be skipped is actually called." # Total hack, but it works, just want an attribute that's always true. Loading