diff --git a/trac/admin/tests/console.py b/trac/admin/tests/console.py
|
a
|
b
|
|
| 132 | 132 | sys.stderr = _err |
| 133 | 133 | sys.stdout = _out |
| 134 | 134 | if expect_exception: |
| 135 | | tb = traceback.format_exc() |
| | 135 | tb = ''.join(traceback.format_exception(*sys.exc_info())) |
| 136 | 136 | message = tb.splitlines()[-1] + '\n' |
| 137 | 137 | return -1, message |
| 138 | 138 | raise |
diff --git a/trac/mimeview/tests/api.py b/trac/mimeview/tests/api.py
|
a
|
b
|
|
| 108 | 108 | self.assertEqual(Converter2(self.env), conversions[2][-1]) |
| 109 | 109 | |
| 110 | 110 | class GroupLinesTestCase(unittest.TestCase): |
| | 111 | |
| | 112 | if not hasattr(unittest.TestCase, "assertTrue"): |
| | 113 | assertTrue = unittest.TestCase.failUnless # Python 2.3 compatibility |
| 111 | 114 | |
| 112 | 115 | def test_empty_stream(self): |
| 113 | 116 | # FIXME: this currently fails |
diff --git a/trac/mimeview/tests/patch.py b/trac/mimeview/tests/patch.py
|
a
|
b
|
|
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 | class PatchRendererTestCase(unittest.TestCase): |
| | 30 | |
| | 31 | if not hasattr(unittest.TestCase, "assertTrue"): |
| | 32 | assertTrue = unittest.TestCase.failUnless # Python 2.3 compatibility |
| 30 | 33 | |
| 31 | 34 | def setUp(self): |
| 32 | 35 | env = EnvironmentStub(enable=[Chrome, PatchRenderer]) |
diff --git a/trac/mimeview/tests/pygments.py b/trac/mimeview/tests/pygments.py
|
a
|
b
|
|
| 34 | 34 | |
| 35 | 35 | class PygmentsRendererTestCase(unittest.TestCase): |
| 36 | 36 | |
| | 37 | if not hasattr(unittest.TestCase, "assertTrue"): |
| | 38 | assertTrue = unittest.TestCase.failUnless # Python 2.3 compatibility |
| | 39 | |
| 37 | 40 | def setUp(self): |
| 38 | 41 | self.env = EnvironmentStub(enable=[Chrome, PygmentsRenderer]) |
| 39 | 42 | self.pygments = Mimeview(self.env).renderers[0] |
diff --git a/trac/test.py b/trac/test.py
|
a
|
b
|
|
| 123 | 123 | for test in self._tests: |
| 124 | 124 | if hasattr(test, 'setFixture'): |
| 125 | 125 | test.setFixture(self.fixture) |
| 126 | | unittest.TestSuite.run(self, result) |
| | 126 | for test in self._tests: # Content of unittest.TestSuite.run() |
| | 127 | if result.shouldStop: # copied here for Python 2.3 compatibility |
| | 128 | break |
| | 129 | test(result) |
| 127 | 130 | self.tearDown() |
| 128 | 131 | return result |
| 129 | 132 | |
| | 133 | def __call__(self, *args, **kwds): # Python 2.3 compatibility |
| | 134 | return self.run(*args, **kwds) |
| | 135 | |
| 130 | 136 | |
| 131 | 137 | class TestCaseSetup(unittest.TestCase): |
| 132 | 138 | def setFixture(self, fixture): |