MCPcopy Create free account
hub / github.com/FastLED/FastLED / parse_args

Function parse_args

ci/run_tests.py:228–249  ·  view source on GitHub ↗

Parse command line arguments and return typed Args dataclass

()

Source from the content-addressed store, hash-verified

226
227
228def parse_args() -> Args:
229 """Parse command line arguments and return typed Args dataclass"""
230 parser = argparse.ArgumentParser(description="Run FastLED unit tests")
231 parser.add_argument("--test", help="Run specific test (without test_ prefix)")
232 parser.add_argument(
233 "--verbose", "-v", action="store_true", help="Show all test output"
234 )
235 parser.add_argument("--jobs", "-j", type=int, help="Number of parallel jobs")
236 parser.add_argument(
237 "--stack-trace",
238 action="store_true",
239 help="Enable GDB stack trace dumps on test crashes/timeouts",
240 )
241
242 parsed_args = parser.parse_args()
243
244 return Args(
245 test=parsed_args.test,
246 verbose=parsed_args.verbose,
247 jobs=parsed_args.jobs,
248 enable_stack_trace=parsed_args.stack_trace,
249 )
250
251
252def run_test(

Callers 1

mainFunction · 0.70

Calls 2

parse_argsMethod · 0.80
ArgsClass · 0.70

Tested by

no test coverage detected