diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-12-06 01:44:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-06 01:44:53 +0000 |
commit | d270aa7b30f6cb0973467806b6b318c9fc39de47 (patch) | |
tree | d2a20d9658c3c78ca91e29e9a8343847f55c8516 /test/CheckOptions.py | |
parent | a0bd969581a5cf3a3f88c74ba31e4764d7b24fd2 (diff) | |
parent | ecbfaa9c2e6733d516351d0a815b4cd822bfed39 (diff) | |
download | fork-ledger-d270aa7b30f6cb0973467806b6b318c9fc39de47.tar.gz fork-ledger-d270aa7b30f6cb0973467806b6b318c9fc39de47.tar.bz2 fork-ledger-d270aa7b30f6cb0973467806b6b318c9fc39de47.zip |
Merge pull request #2311 from afh/modernize-test-scripts
tests: Modernize test scripts
Diffstat (limited to 'test/CheckOptions.py')
-rwxr-xr-x | test/CheckOptions.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CheckOptions.py b/test/CheckOptions.py index faf1630e..cdd9b244 100755 --- a/test/CheckOptions.py +++ b/test/CheckOptions.py @@ -4,6 +4,7 @@ import re import os import sys import shlex +import pathlib import argparse import subprocess @@ -11,6 +12,15 @@ from os.path import * from subprocess import Popen, PIPE class CheckOptions (object): + @staticmethod + def parser(): + parser = argparse.ArgumentParser(add_help=False) + parser.add_argument('-l', '--ledger', type=pathlib.Path, required=True, + help='the path to the ledger executable to test with') + parser.add_argument('-s', '--source', type=pathlib.Path, required=True, + help='the path to the top level ledger source directory') + return parser + def __init__(self, args): self.option_pattern = None self.source_file = None |