From 60d01e6fbb76c9e1ae5bcecd0a4ae6e96dfc3174 Mon Sep 17 00:00:00 2001 From: Jonathan Lange Date: Tue, 10 Apr 2012 14:41:45 +0100 Subject: Composition is better than inheritance. --- python/subunit/test_results.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/subunit/test_results.py b/python/subunit/test_results.py index 25c5c77..6c74ec3 100644 --- a/python/subunit/test_results.py +++ b/python/subunit/test_results.py @@ -389,7 +389,7 @@ class _PredicateFilter(TestResultDecorator): return id -class TestResultFilter(_PredicateFilter): +class TestResultFilter(TestResultDecorator): """A pyunit TestResult interface implementation which filters tests. Tests that pass the filter are handed on to another TestResult instance @@ -448,7 +448,8 @@ class TestResultFilter(_PredicateFilter): lambda test, outcome, err, details, tags: all_true(p(test, outcome, err, details, tags) for p in predicates)) - super(TestResultFilter, self).__init__(result, predicate) + super(TestResultFilter, self).__init__( + _PredicateFilter(result, predicate)) if fixup_expected_failures is None: self._fixup_expected_failures = frozenset() else: -- cgit v1.2.1