Skip to content

Commit

Permalink
#2826 Add config option to argpass usage message
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-alistairp committed Dec 19, 2024
1 parent 047c2a5 commit 376f674
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/psyclone/psyad/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def msg():
'''Function to overide the argpass usage message'''
return ("psyad [-h] [-oad OAD] [-v] [-t] [-api API] "
"[-coord-arg COORD_ARG] [-panel-id-arg PANEL_ID_ARG] "
"[-otest TEST_FILENAME] "
"[-otest TEST_FILENAME] [-c CONFIG] "
"-a ACTIVE [ACTIVE ...] -- filename")

parser = argparse.ArgumentParser(
Expand Down
4 changes: 2 additions & 2 deletions src/psyclone/tests/psyad/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def test_main_h_option(capsys):
expected2 = (
"[-h] [-oad OAD] [-v] [-t] [-api API] [-coord-arg COORD_ARG] "
"[-panel-id-arg PANEL_ID_ARG] [-otest TEST_FILENAME] "
"-a ACTIVE [ACTIVE ...] -- filename\n\n"
"[-c CONFIG] -a ACTIVE [ACTIVE ...] -- filename\n\n"
"Run the PSyclone adjoint code generator on a tangent-linear "
"kernel file\n\n"
"positional arguments:\n"
Expand Down Expand Up @@ -234,7 +234,7 @@ def test_main_no_args(capsys):
expected1 = "usage: "
expected2 = ("[-h] [-oad OAD] [-v] [-t] [-api API] [-coord-arg COORD_ARG] "
"[-panel-id-arg PANEL_ID_ARG] [-otest TEST_FILENAME] "
"-a ACTIVE [ACTIVE ...] -- filename")
"[-c CONFIG] -a ACTIVE [ACTIVE ...] -- filename")
expected3 = ("error: the following arguments are required: "
"-a/--active, filename\n")
assert expected1 in error
Expand Down

0 comments on commit 376f674

Please sign in to comment.