@@ -67,20 +67,17 @@ def _summary_report_config(args=None):
6767 """ Get the summary report config based on arguments
6868 """
6969 report_lists = [TestCompletionStatus .error , TestCompletionStatus .failure ]
70- if args is None :
70+ if args is None or args . list_summary is None :
7171 return report_lists
72- if args . report_skipped or args .report_all :
72+ if 'skipped' in args .list_summary :
7373 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 )
7874 return report_lists
7975
8076
8177class QuietTestResultHandler (IResultHandlerPlugin ):
8278 separator1 = '=' * 70
8379 separator2 = separator2
80+ OPTION_DEFAULT = object ()
8481
8582 _summary_formats = {
8683 TestCompletionStatus .failure : 'FAIL' ,
@@ -124,25 +121,8 @@ def from_args(cls, args, name, dest_prefix, test_count):
124121 @classmethod
125122 def add_parser_arguments (cls , parser , name , option_prefix , dest_prefix ):
126123 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' ))
146126
147127 def get_test_description (self , test ):
148128 return get_test_description (test , descriptions = self .descriptions )
0 commit comments