File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020}}
2121"""
2222
23- class FullErrorMsgParser (ArgumentParser ):
24- """
25- Modified ArgumentParser that prints full error message on any error.
26- """
27-
28- def error (self , message ):
29- sys .stderr .write ("error: %s\n " % message )
30- self .print_help ()
31- sys .exit (2 )
32-
3323def save_tests_in_files (N_files , tests ):
3424 """
3525 Saves tests in files
@@ -137,31 +127,3 @@ def main(functions=(), j=1):
137127 )
138128
139129 save_tests_in_files (j , tests )
140-
141- def processCLIArgs ():
142- """
143- Define and process the command line interface to the benchmark.py script.
144- """
145- parser = FullErrorMsgParser (
146- description = "Generate and run_command benchmarks." ,
147- formatter_class = ArgumentDefaultsHelpFormatter ,
148- )
149- parser .add_argument (
150- "--functions" ,
151- nargs = "+" ,
152- type = str ,
153- default = [],
154- help = "Signatures and/or function names to benchmark. Ignores any finished checks in results file (if given)." ,
155- )
156- parser .add_argument (
157- "-j" ,
158- type = int ,
159- default = 1 ,
160- help = "Number of parallel cores to use." ,
161- )
162- args = parser .parse_args ()
163-
164- main (functions = args .functions , j = args .j )
165-
166- if __name__ == "__main__" :
167- processCLIArgs ()
You can’t perform that action at this time.
0 commit comments