aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_quiet.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-31 14:17:27 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commit2f490c80f9623ac2deaeb37a29fc98d01eb20e7e (patch)
treef3dcbbef79d7bf3ae0ff30768bdce69a57cfeee3 /test/test_quiet.py
parent55cb2411c1ddfe268c5d48f486f4da02470ab3d1 (diff)
downloadserd-2f490c80f9623ac2deaeb37a29fc98d01eb20e7e.tar.gz
serd-2f490c80f9623ac2deaeb37a29fc98d01eb20e7e.tar.bz2
serd-2f490c80f9623ac2deaeb37a29fc98d01eb20e7e.zip
Factor out test runner script argument parsing
Diffstat (limited to 'test/test_quiet.py')
-rwxr-xr-xtest/test_quiet.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/test_quiet.py b/test/test_quiet.py
index 42d05785..676284bb 100755
--- a/test/test_quiet.py
+++ b/test/test_quiet.py
@@ -3,20 +3,14 @@
# Copyright 2022 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: ISC
-"""Test serdi quiet option."""
+"""Test quiet command-line option."""
-import argparse
-import sys
import shlex
import subprocess
-parser = argparse.ArgumentParser(description=__doc__)
+import serd_test_util as util
-parser.add_argument("--serdi", default="./serdi", help="path to serdi")
-parser.add_argument("--wrapper", default="", help="executable wrapper")
-parser.add_argument("input", help="invalid input file")
-
-args = parser.parse_args(sys.argv[1:])
+args = util.wrapper_args(__doc__, True)
command = shlex.split(args.wrapper) + [args.serdi, "-q", args.input]
proc = subprocess.run(
command, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE