mirror of
https://github.com/ihabunek/toot.git
synced 2025-05-18 00:58:30 -04:00
Add assert_ok helper
This commit is contained in:
parent
5cd25e2ce2
commit
b97a995dc4
@ -155,3 +155,8 @@ def posted_status_id(out):
|
||||
_, _, status_id = match.groups()
|
||||
|
||||
return status_id
|
||||
|
||||
|
||||
def assert_ok(result: Result):
|
||||
if result.exit_code != 0:
|
||||
raise AssertionError(f"Command failed with exit code {result.exit_code}\nStderr: {result.stderr}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user