summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJonathan Lange <jml@mumak.net>2012-04-10 14:41:45 +0100
committerJonathan Lange <jml@mumak.net>2012-04-10 14:41:45 +0100
commit60d01e6fbb76c9e1ae5bcecd0a4ae6e96dfc3174 (patch)
tree020614a0e96784e8013eacbc6486aee66d92c200 /python
parent3cbc2211d91877f2c24c9bed2f50c5a68cfa9deb (diff)
downloadsubunit-git-60d01e6fbb76c9e1ae5bcecd0a4ae6e96dfc3174.tar.gz
Composition is better than inheritance.
Diffstat (limited to 'python')
-rw-r--r--python/subunit/test_results.py5
1 files changed, 3 insertions, 2 deletions
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: