From 41aa818c4ce40108d57ca263cb3ce45cb607edd8 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 10 Feb 2020 13:42:57 +0100 Subject: [PATCH] tests: shut down test suite if no device is available this seems better than erroring out dozens of tests --- tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a1c422957d..90021d5741 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -36,7 +36,7 @@ def get_device(): transport = get_transport(path) return TrezorClientDebugLink(transport, auto_interact=not interact) except Exception as e: - raise RuntimeError("Failed to open debuglink for {}".format(path)) from e + pytest.exit("Failed to open debuglink for {}".format(path), 3) else: devices = enumerate_devices() @@ -46,7 +46,7 @@ def get_device(): except Exception: pass else: - raise RuntimeError("No debuggable device found") + pytest.exit("No debuggable device found", 3) @pytest.fixture(scope="function")