diff options
| author | Robert Collins <robertc@robertcollins.net> | 2011-10-31 20:56:59 +1300 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2011-10-31 20:56:59 +1300 |
| commit | 81aa7596833daa779ddfb3eb352e9b8c64e947c6 (patch) | |
| tree | e0ee358d56b3bc39c11b0d3ec1dd6b63af19c02a /python/subunit | |
| parent | 0401a214b905783cbbbd5527a98a11eff49dff5e (diff) | |
| parent | d85610fab1b0ed73df9b59f813ff7cd683d6e101 (diff) | |
| download | subunit-git-81aa7596833daa779ddfb3eb352e9b8c64e947c6.tar.gz | |
Merge trunk work that had gotten diverged.
Diffstat (limited to 'python/subunit')
| -rw-r--r-- | python/subunit/__init__.py | 4 | ||||
| -rwxr-xr-x | python/subunit/run.py | 2 | ||||
| -rw-r--r-- | python/subunit/test_results.py | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index 414b368..b4c9397 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -59,12 +59,12 @@ and newer). The ``tags(new_tags, gone_tags)`` method is called (if present) to add or remove tags in the test run that is currently executing. If called when no test is in progress (that is, if called outside of the ``startTest``, -``stopTest`` pair), the the tags apply to all sebsequent tests. If called +``stopTest`` pair), the the tags apply to all subsequent tests. If called when a test is in progress, then the tags only apply to that test. The ``time(a_datetime)`` method is called (if present) when a ``time:`` directive is encountered in a Subunit stream. This is used to tell a TestResult -about the time that events in the stream occured at, to allow reconstructing +about the time that events in the stream occurred at, to allow reconstructing test timing from a stream. The ``progress(offset, whence)`` method controls progress data for a stream. diff --git a/python/subunit/run.py b/python/subunit/run.py index b390de3..51d6837 100755 --- a/python/subunit/run.py +++ b/python/subunit/run.py @@ -49,7 +49,7 @@ class SubunitTestProgram(TestProgram): def usageExit(self, msg=None): if msg: - print msg + print (msg) usage = {'progName': self.progName, 'catchbreak': '', 'failfast': '', 'buffer': ''} if self.failfast != False: 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 = ( |
