aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_write_error.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-10-09 13:44:31 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit0bd10132c6707353dba80bd89cf0102ee7ca4e34 (patch)
tree6ddefca863cb7dc50f539899dde6def80043601d /test/test_write_error.py
parent66c589578eb9b9dc89da6a34d274627f7f2435d7 (diff)
downloadserd-0bd10132c6707353dba80bd89cf0102ee7ca4e34.tar.gz
serd-0bd10132c6707353dba80bd89cf0102ee7ca4e34.tar.bz2
serd-0bd10132c6707353dba80bd89cf0102ee7ca4e34.zip
Test handling of deferred write errors that happen when closing
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: