diff options
Diffstat (limited to 'python/subunit')
| -rw-r--r-- | python/subunit/test_results.py | 2 | ||||
| -rw-r--r-- | python/subunit/tests/test_subunit_filter.py | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/python/subunit/test_results.py b/python/subunit/test_results.py index e3240e0..f312416 100644 --- a/python/subunit/test_results.py +++ b/python/subunit/test_results.py @@ -363,7 +363,7 @@ class TestResultFilter(TestResultDecorator): def addSkip(self, test, reason=None, details=None): if (self.filter_predicate(test, 'skip', reason, details)): self._buffered_calls.append( - ('addSkip', [reason], {'details': details})) + ('addSkip', [test, reason], {'details': details})) else: self._filtered() diff --git a/python/subunit/tests/test_subunit_filter.py b/python/subunit/tests/test_subunit_filter.py index 87d4209..0675484 100644 --- a/python/subunit/tests/test_subunit_filter.py +++ b/python/subunit/tests/test_subunit_filter.py @@ -187,6 +187,20 @@ xfail todo ('stopTest', foo), ('time', date_c)], result._events) + def test_skip_preserved(self): + subunit_stream = _b('\n'.join([ + "test: foo", + "skip: foo", + ""])) + result = ExtendedTestResult() + result_filter = TestResultFilter(result) + self.run_tests(result_filter, subunit_stream) + foo = subunit.RemotedTestCase('foo') + self.assertEquals( + [('startTest', foo), + ('addSkip', foo, {}), + ('stopTest', foo), ], result._events) + def test_suite(): loader = subunit.tests.TestUtil.TestLoader() |
