mirror of
https://github.com/ihabunek/toot.git
synced 2024-09-22 04:25:55 -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…
Reference in New Issue
Block a user