Skip to content

Commit cfe8dcc

Browse files
authored
Merge pull request #320 from pinheadmz/test-warcli-error
test: raise exception on base.warcli() error
2 parents cc092de + f97581d commit cfe8dcc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

test/graph_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
file.write(xml)
2525

2626
# Validate the graph schema
27-
assert "invalid" not in base.warcli(f"graph validate {Path(tf)}")
27+
assert "invalid" not in base.warcli(f"graph validate {Path(tf)}", False)
2828
print(f"Graph at {tf} validated successfully")
2929

3030
# Test that the graph actually works

test/test_base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def warcli(self, str, network=True):
8282
if network:
8383
cmd += ["--network", self.network_name]
8484
proc = run(cmd, capture_output=True)
85+
86+
if proc.stderr:
87+
raise Exception(proc.stderr.decode().strip())
8588
return proc.stdout.decode().strip()
8689

8790
# Execute a warnet RPC API call directly (may return dict or list)

0 commit comments

Comments
 (0)