aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_write_error.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_write_error.py')
-rwxr-xr-xtest/test_write_error.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/test/test_write_error.py b/test/test_write_error.py
index 7d165a6a..84d32b49 100755
--- a/test/test_write_error.py
+++ b/test/test_write_error.py
@@ -5,15 +5,20 @@
"""Test errors writing to a file."""
-import sys
+import argparse
+import os
import shlex
import subprocess
-import os
+import sys
-import serd_test_util as util
+parser = argparse.ArgumentParser(description=__doc__)
+parser.add_argument("--tool", default="tools/serd-pipe", help="executable")
+parser.add_argument("--wrapper", default="", help="executable wrapper")
+parser.add_argument("input", help="valid input file")
+parser.add_argument("arg", nargs=argparse.REMAINDER, help="tool argument")
+args = parser.parse_args(sys.argv[1:])
-args = util.wrapper_args(__doc__, True)
-command = shlex.split(args.wrapper) + [args.tool, args.input]
+command = shlex.split(args.wrapper) + [args.tool] + args.arg + [args.input]
if os.path.exists("/dev/full"):
with open("/dev/full", "w", encoding="utf-8") as out: