aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_quiet.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_quiet.py')
-rwxr-xr-xtest/test_quiet.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_quiet.py b/test/test_quiet.py
new file mode 100755
index 00000000..f1d4e739
--- /dev/null
+++ b/test/test_quiet.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+
+"""Test serdi quiet option."""
+
+import argparse
+import sys
+import shlex
+import subprocess
+
+parser = argparse.ArgumentParser(description=__doc__)
+
+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:])
+command = shlex.split(args.wrapper) + [args.serdi, "-q", args.input]
+proc = subprocess.run(
+ command, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE
+)
+
+assert proc.returncode != 0
+assert args.wrapper or len(proc.stderr) == 0