Skip to content

Commit

Permalink
Merge pull request #320 from pinheadmz/test-warcli-error
Browse files Browse the repository at this point in the history
test: raise exception on base.warcli() error
  • Loading branch information
pinheadmz authored Mar 24, 2024
2 parents cc092de + f97581d commit cfe8dcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/graph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
file.write(xml)

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

# Test that the graph actually works
Expand Down
3 changes: 3 additions & 0 deletions test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def warcli(self, str, network=True):
if network:
cmd += ["--network", self.network_name]
proc = run(cmd, capture_output=True)

if proc.stderr:
raise Exception(proc.stderr.decode().strip())
return proc.stdout.decode().strip()

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

0 comments on commit cfe8dcc

Please sign in to comment.