From ec7ca6bab50f56a00821a90910a89c634fcd389f Mon Sep 17 00:00:00 2001 From: Hendrik Brucker Date: Wed, 4 Sep 2024 16:04:31 +0200 Subject: [PATCH] [Tests] Improve argument description and snake_case name conversion of test generator script --- tests/create_test.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/create_test.py b/tests/create_test.py index deb53aca20b..ad6d6b882fc 100755 --- a/tests/create_test.py +++ b/tests/create_test.py @@ -13,12 +13,16 @@ def main(): os.chdir(os.path.dirname(os.path.realpath(__file__))) parser = argparse.ArgumentParser(description="Creates a new unit test file.") - parser.add_argument("name", type=str, help="The unit test name in PascalCase notation") + parser.add_argument( + "name", + type=str, + help="Specifies the class or component name to be tested, in PascalCase (e.g., MeshInstance3D). The name will be prefixed with 'test_' for the header file and 'Test' for the namespace.", + ) parser.add_argument( "path", type=str, nargs="?", - help="The path to the unit test file relative to the tests folder (default: .)", + help="The path to the unit test file relative to the tests folder (e.g. core). This should correspond to the relative path of the class or component being tested. (default: .)", default=".", ) parser.add_argument( @@ -29,9 +33,10 @@ def main(): ) args = parser.parse_args() - snake_case_regex = re.compile(r"(?