@@ -67,20 +67,17 @@ def _summary_report_config(args=None):
67
67
""" Get the summary report config based on arguments
68
68
"""
69
69
report_lists = [TestCompletionStatus .error , TestCompletionStatus .failure ]
70
- if args is None :
70
+ if args is None or args . list_summary is None :
71
71
return report_lists
72
- if args . report_skipped or args .report_all :
72
+ if 'skipped' in args .list_summary :
73
73
report_lists .append (TestCompletionStatus .skipped )
74
- if args .report_expected_failures or args .report_all :
75
- report_lists .append (TestCompletionStatus .expected_failure )
76
- if args .report_unxpected_success or args .report_all :
77
- report_lists .append (TestCompletionStatus .unexpected_success )
78
74
return report_lists
79
75
80
76
81
77
class QuietTestResultHandler (IResultHandlerPlugin ):
82
78
separator1 = '=' * 70
83
79
separator2 = separator2
80
+ OPTION_DEFAULT = object ()
84
81
85
82
_summary_formats = {
86
83
TestCompletionStatus .failure : 'FAIL' ,
@@ -124,25 +121,8 @@ def from_args(cls, args, name, dest_prefix, test_count):
124
121
@classmethod
125
122
def add_parser_arguments (cls , parser , name , option_prefix , dest_prefix ):
126
123
parser .add_argument (
127
- '--report-skipped' , action = 'store' , type = bool ,
128
- metavar = 'REPORT_SKIPPED_TESTS' ,
129
- default = cls .OPTION_DEFAULT ,
130
- help = ('Report skipped tests' ))
131
- parser .add_argument (
132
- '--report-expected-failures' , action = 'store' , type = bool ,
133
- metavar = 'REPORT_EXPECTED_FAILURE_TESTS' ,
134
- default = cls .OPTION_DEFAULT ,
135
- help = ('Report expected failure tests' ))
136
- parser .add_argument (
137
- '--report-unexpected-success' , action = 'store' , type = bool ,
138
- metavar = 'REPORT_UNEXPECTED_SUCCESS_TESTS' ,
139
- default = cls .OPTION_DEFAULT ,
140
- help = ('Report unexpected success tests' ))
141
- parser .add_argument (
142
- '--report-all' , action = 'store' , type = bool ,
143
- metavar = 'REPORT_ALL_TESTS' ,
144
- default = cls .OPTION_DEFAULT ,
145
- help = ('Report list for all test types' ))
124
+ '--list-summary' , nargs = '?' ,
125
+ help = ('Report test list summary' ))
146
126
147
127
def get_test_description (self , test ):
148
128
return get_test_description (test , descriptions = self .descriptions )
0 commit comments