1
0

Add --only-todo
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 23s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s

This commit is contained in:
Jon Michael Aanes 2025-03-13 16:46:38 +01:00
parent 7d553e5a8e
commit a4dd2a3b9f
2 changed files with 10 additions and 1 deletions

View File

@ -42,6 +42,7 @@ class Config:
with_display_name: bool with_display_name: bool
only_for_javadoc: bool only_for_javadoc: bool
only_for_display_name: bool only_for_display_name: bool
only_for_todo: bool
naming_scheme: NamingScheme naming_scheme: NamingScheme
@ -198,6 +199,8 @@ def replace_test_pattern(
return match.group(0) return match.group(0)
if config.only_for_display_name and not displayname: if config.only_for_display_name and not displayname:
return match.group(0) return match.group(0)
if config.only_for_todo and 'todo' not in name.lower():
return match.group(0)
# Formatting # Formatting
description = displayname or javadoc or from_camel_case(name) description = displayname or javadoc or from_camel_case(name)

View File

@ -56,7 +56,12 @@ def argument_parser():
argparser.add_argument( argparser.add_argument(
'--only-displayname', '--only-displayname',
action='store_true', action='store_true',
help='Only change test with an existing DisplayName', help='Only change tests with an existing DisplayName',
)
argparser.add_argument(
'--only-todo',
action='store_true',
help='Only change tests where the test name contains the word "todo"',
) )
argparser.add_argument( argparser.add_argument(
'--naming', '--naming',
@ -77,6 +82,7 @@ def main():
with_display_name=args.displayname, with_display_name=args.displayname,
only_for_javadoc=args.only_javadoc, only_for_javadoc=args.only_javadoc,
only_for_display_name=args.only_displayname, only_for_display_name=args.only_displayname,
only_for_todo=args.only_todo,
naming_scheme=args.naming, naming_scheme=args.naming,
) )