diff options
| author | Jonathan Lange <jml@canonical.com> | 2011-02-13 14:52:42 +0000 |
|---|---|---|
| committer | Jonathan Lange <jml@canonical.com> | 2011-02-13 14:52:42 +0000 |
| commit | e0581e6819db7c2872ced4d43e803ae7b5e7bd05 (patch) | |
| tree | da7a06a44b88c0797f896edad5ab3407fab44f23 /python/subunit/tests | |
| parent | d86c97154604bd029774d8095b394de26af4867c (diff) | |
| download | subunit-git-e0581e6819db7c2872ced4d43e803ae7b5e7bd05.tar.gz | |
Make sure that we don't send time if there are none to send.
Diffstat (limited to 'python/subunit/tests')
| -rw-r--r-- | python/subunit/tests/test_test_results.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/python/subunit/tests/test_test_results.py b/python/subunit/tests/test_test_results.py index 8633b44..bed2bd8 100644 --- a/python/subunit/tests/test_test_results.py +++ b/python/subunit/tests/test_test_results.py @@ -263,6 +263,21 @@ class TestTimeCollapsingDecorator(TestCase): tag_collapser.startTest(subunit.RemotedTestCase('foo')) self.assertEquals([('time', a_time)], result._events[:-1]) + def test_no_times_inserted(self): + result = ExtendedTestResult() + tag_collapser = subunit.test_results.TimeCollapsingDecorator(result) + a_time = self.make_time() + tag_collapser.time(a_time) + foo = subunit.RemotedTestCase('foo') + tag_collapser.startTest(foo) + tag_collapser.addSuccess(foo) + tag_collapser.stopTest(foo) + self.assertEquals( + [('time', a_time), + ('startTest', foo), + ('addSuccess', foo), + ('stopTest', foo)], result._events) + def test_suite(): loader = subunit.tests.TestUtil.TestLoader() |
