diff options
| author | Benji York <benji.york@canonical.com> | 2012-04-26 09:17:40 -0400 |
|---|---|---|
| committer | Benji York <benji.york@canonical.com> | 2012-04-26 09:17:40 -0400 |
| commit | 921271fc0df34aebd9610e41b49b26dfb9831d16 (patch) | |
| tree | dce3a663bca2b4ff09a3202e9a005eecb4f10cc4 /python | |
| parent | 88fb8f5bb9d1eaa3807d597661e4215b4727b894 (diff) | |
| download | subunit-git-921271fc0df34aebd9610e41b49b26dfb9831d16.tar.gz | |
make time pass through filtered tests
Diffstat (limited to 'python')
| -rw-r--r-- | python/subunit/test_results.py | 5 | ||||
| -rw-r--r-- | python/subunit/tests/test_subunit_filter.py | 5 |
2 files changed, 4 insertions, 6 deletions
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) |
