aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_test_suite.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-07-05 21:01:12 +0200
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commita79d62b9f8c0a75efe56d135a0f08b898969338d (patch)
treeaf6dcd93705db49e613f6d3cde2e0d386f9b0add /test/run_test_suite.py
parente0fc63762de7fd92d6b35c20185e14117839a90f (diff)
downloadserd-a79d62b9f8c0a75efe56d135a0f08b898969338d.tar.gz
serd-a79d62b9f8c0a75efe56d135a0f08b898969338d.tar.bz2
serd-a79d62b9f8c0a75efe56d135a0f08b898969338d.zip
Simplify writer style options
Diffstat (limited to 'test/run_test_suite.py')
-rwxr-xr-xtest/run_test_suite.py34
1 files changed, 23 insertions, 11 deletions
diff --git a/test/run_test_suite.py b/test/run_test_suite.py
index e4f5a79a..2d52e576 100755
--- a/test/run_test_suite.py
+++ b/test/run_test_suite.py
@@ -47,6 +47,13 @@ def log_error(message):
sys.stderr.write(message)
+def test_osyntax_options(osyntax):
+ if osyntax.lower() == "ntriples" or osyntax.lower() == "nquads":
+ return ["-a"]
+
+ return []
+
+
def test_thru(
base_uri,
path,
@@ -81,16 +88,21 @@ def test_thru(
]
)
- thru_cmd = command_prefix + [
- "-i",
- isyntax,
- "-o",
- osyntax,
- "-c",
- "foo",
- out_path,
- base_uri,
- ]
+ thru_cmd = (
+ command_prefix
+ + test_osyntax_options(osyntax)
+ + [
+ "-i",
+ isyntax,
+ "-o",
+ osyntax,
+ "-c",
+ "foo",
+ "-a",
+ out_path,
+ base_uri,
+ ]
+ )
with open(out_path, "wb") as out:
subprocess.run(out_cmd, check=True, stdout=out)
@@ -232,7 +244,7 @@ def test_suite(
test_name = os.path.basename(test_uri_path)
test_path = os.path.join(test_dir, test_name)
- command = command_prefix + ["-f", test_path, test_uri]
+ command = command_prefix + ["-a"] + [test_path, test_uri]
command_string = " ".join(shlex.quote(c) for c in command)
out_filename = os.path.join(out_test_dir, test_name + ".out")