diff options
author | Thomi Richards <thomi.richards@canonical.com> | 2013-11-19 12:47:22 +1300 |
---|---|---|
committer | Thomi Richards <thomi.richards@canonical.com> | 2013-11-19 12:47:22 +1300 |
commit | 3feea3cf5f15d40808b0a787bd2bee15e600f614 (patch) | |
tree | 3cb0d7b84838da351b3a029c8bc6dfe85ff27051 /python/subunit/_output.py | |
parent | 78a8d097a53203d717a653fe3184874bc988660f (diff) | |
download | subunit-git-3feea3cf5f15d40808b0a787bd2bee15e600f614.tar.gz |
Add support for expected fail and unexpected success test statuses.
Diffstat (limited to 'python/subunit/_output.py')
-rw-r--r-- | python/subunit/_output.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/python/subunit/_output.py b/python/subunit/_output.py index 788a19f..ba6d0ce 100644 --- a/python/subunit/_output.py +++ b/python/subunit/_output.py @@ -101,6 +101,20 @@ def parse_arguments(args=None, ParserClass=ArgumentParser): parents=[common_args] ) + parser_expected_fail = sub_parsers.add_parser( + "expected-fail", + help="Marks a test as failing expectedly (this is not counted as a "\ + "failure). " + final_state, + parents=[common_args], + ) + + parser_unexpected_success = sub_parsers.add_parser( + "unexpected-success", + help="Marks a test as succeeding unexpectedly (this is counted as a "\ + "failure). " + final_state, + parents=[common_args], + ) + return parser.parse_args(args) @@ -112,6 +126,8 @@ def translate_command_name(command_name): return { 'start': 'inprogress', 'pass': 'success', + 'expected-fail': 'xfail', + 'unexpected-success': 'uxsuccess', }.get(command_name, command_name) |