Add assert_ok helper

pull/482/head
Ivan Habunek 2024-04-21 10:03:10 +02:00
rodzic 5cd25e2ce2
commit b97a995dc4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F5F0623FF5EBCB3D
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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}")