From 2c0cf2e0c933b16a107cc29451ad92d3a48bb481 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Tue, 5 Dec 2023 12:08:15 +0100 Subject: tests: Modernize test scripts by using argparse and pathlib and removing Python 2 specific code. --- test/CheckTexinfo.py | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'test/CheckTexinfo.py') diff --git a/test/CheckTexinfo.py b/test/CheckTexinfo.py index 82c7a286..7b13c50e 100755 --- a/test/CheckTexinfo.py +++ b/test/CheckTexinfo.py @@ -90,24 +90,9 @@ class CheckTexinfo (CheckOptions): return options if __name__ == "__main__": - def getargs(): - parser = argparse.ArgumentParser(prog='CheckTexinfo', - description='Check that ledger options are documented in the texinfo manual') - parser.add_argument('-l', '--ledger', - dest='ledger', - type=str, - action='store', - required=True, - help='the path to the ledger executable to test with') - parser.add_argument('-s', '--source', - dest='source', - type=str, - action='store', - required=True, - help='the path to the top level ledger source directory') - return parser.parse_args() - - args = getargs() + args = argparse.ArgumentParser(prog='CheckTexinfo', + description='Check that ledger options are documented in the texinfo manual', + parents=[CheckOptions.parser()]).parse_args() script = CheckTexinfo(args) status = script.main() sys.exit(status) -- cgit v1.2.3