From bd5107a642a7b704661e492566e588e944669a25 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Tue, 10 Apr 2012 14:12:20 +0100 Subject: A layer of abstraction that can help us. --- python/subunit/test_results.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/subunit/test_results.py b/python/subunit/test_results.py index 7acd5ea..92e0310 100644 --- a/python/subunit/test_results.py +++ b/python/subunit/test_results.py @@ -292,7 +292,7 @@ class _PredicateFilter(TestResultDecorator): super(_PredicateFilter, self).__init__(result) self.decorated = TimeCollapsingDecorator( TagCollapsingDecorator(self.decorated)) - self.filter_predicate = predicate + self._predicate = predicate # The current test (for filtering tags) self._current_test = None # Has the current test been filtered (for outputting test tags) @@ -300,6 +300,9 @@ class _PredicateFilter(TestResultDecorator): # Calls to this result that we don't know whether to forward on yet. self._buffered_calls = [] + def filter_predicate(self, test, outcome, error, details): + return self._predicate(test, outcome, error, details) + def addError(self, test, err=None, details=None): if (self.filter_predicate(test, 'error', err, details)): self._buffered_calls.append( -- cgit v1.2.1