diff options
| author | Jonathan Lange <jml@canonical.com> | 2011-07-04 18:54:46 +0100 |
|---|---|---|
| committer | Jonathan Lange <jml@canonical.com> | 2011-07-04 18:54:46 +0100 |
| commit | d172dafd8deb09eb4fcc0454db024c5c9ed2bfd3 (patch) | |
| tree | 2d89261cc9288daeb6ca49a087f718e80161d68b /python/subunit/test_results.py | |
| parent | 632d148f4f657b85f0697c06e8cc8b05ff22192e (diff) | |
| parent | 141bd28d1f8fb5858add01f4efdfcf0952de7f21 (diff) | |
| download | subunit-d172dafd8deb09eb4fcc0454db024c5c9ed2bfd3.tar.gz | |
Add "subunit-filter -F" to set all the flags that remove things that isn't a "failure"
Diffstat (limited to 'python/subunit/test_results.py')
| -rw-r--r-- | python/subunit/test_results.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/subunit/test_results.py b/python/subunit/test_results.py index 9f64544..33fb50e 100644 --- a/python/subunit/test_results.py +++ b/python/subunit/test_results.py @@ -294,7 +294,7 @@ class TestResultFilter(TestResultDecorator): """ def __init__(self, result, filter_error=False, filter_failure=False, - filter_success=True, filter_skip=False, + filter_success=True, filter_skip=False, filter_xfail=False, filter_predicate=None, fixup_expected_failures=None): """Create a FilterResult object filtering to result. @@ -302,6 +302,7 @@ class TestResultFilter(TestResultDecorator): :param filter_failure: Filter out failures. :param filter_success: Filter out successful tests. :param filter_skip: Filter out skipped tests. + :param filter_xfail: Filter out expected failure tests. :param filter_predicate: A callable taking (test, outcome, err, details) and returning True if the result should be passed through. err and details may be none if no error or extra @@ -322,6 +323,8 @@ class TestResultFilter(TestResultDecorator): predicates.append(lambda t, outcome, e, d: outcome != 'success') if filter_skip: predicates.append(lambda t, outcome, e, d: outcome != 'skip') + if filter_xfail: + predicates.append(lambda t, outcome, e, d: outcome != 'expectedfailure') if filter_predicate is not None: predicates.append(filter_predicate) self.filter_predicate = ( |
