From 921271fc0df34aebd9610e41b49b26dfb9831d16 Mon Sep 17 00:00:00 2001 From: Benji York Date: Thu, 26 Apr 2012 09:17:40 -0400 Subject: make time pass through filtered tests --- python/subunit/test_results.py | 5 +---- python/subunit/tests/test_subunit_filter.py | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'python') diff --git a/python/subunit/test_results.py b/python/subunit/test_results.py index 8db40e1..b800be9 100644 --- a/python/subunit/test_results.py +++ b/python/subunit/test_results.py @@ -439,10 +439,7 @@ class TestResultFilter(TestResultDecorator): self._buffered_calls = [] def time(self, a_time): - if self._current_test is not None: - self._buffered_calls.append(('time', [a_time], {})) - else: - return self.decorated.time(a_time) + return self.decorated.time(a_time) def id_to_orig_id(self, id): if id.startswith("subunit.RemotedTestCase."): diff --git a/python/subunit/tests/test_subunit_filter.py b/python/subunit/tests/test_subunit_filter.py index 0675484..123be08 100644 --- a/python/subunit/tests/test_subunit_filter.py +++ b/python/subunit/tests/test_subunit_filter.py @@ -179,10 +179,11 @@ xfail todo result_filter = TestResultFilter(result) self.run_tests(result_filter, subunit_stream) foo = subunit.RemotedTestCase('foo') - self.assertEquals( + self.maxDiff = None + self.assertSequenceEqual( [('time', date_a), - ('startTest', foo), ('time', date_b), + ('startTest', foo), ('addError', foo, {}), ('stopTest', foo), ('time', date_c)], result._events) -- cgit v1.2.1