Skip to content

Commit

Permalink
Update with arg and tests
Browse files Browse the repository at this point in the history
Signed-off-by: hoangtungdinh <11166240+hoangtungdinh@users.noreply.github.com>
  • Loading branch information
hoangtungdinh committed Aug 19, 2024
1 parent 8ca5b55 commit dad5c79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ htmlcov
coverage.xml
.coverage*
.python-version
generated_checker_bundle_doc.md
6 changes: 4 additions & 2 deletions qc_openscenario/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def args_entrypoint() -> argparse.Namespace:
group.add_argument("-d", "--default_config", action="store_true")
group.add_argument("-c", "--config_path")

parser.add_argument("-g", "--generate_markdown", action="store_true")

return parser.parse_args()


Expand Down Expand Up @@ -75,8 +77,8 @@ def main():
)
)

# Uncomment the follow line to generate the checker bundle documentation.
# result.write_markdown_doc("checker_bundle_doc.md")
if args.generate_markdown:
result.write_markdown_doc("generated_checker_bundle_doc.md")

logging.info("Done")

Expand Down
6 changes: 1 addition & 5 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ def launch_main(monkeypatch):
monkeypatch.setattr(
sys,
"argv",
[
"main.py",
"-c",
CONFIG_FILE_PATH,
],
["main.py", "-c", CONFIG_FILE_PATH, "--generate_markdown"],
)
main.main()

Expand Down

0 comments on commit dad5c79

Please sign in to comment.