Skip to content

Commit

Permalink
Support interactive testing using INTERACT=1
Browse files Browse the repository at this point in the history
  • Loading branch information
mmilata authored and matejcik committed Nov 23, 2022
1 parent 6dcf784 commit 28e177c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/vendor/trezor/utils.py
Expand Up @@ -10,18 +10,19 @@

def get_device():
path = os.environ.get("TREZOR_PATH")
interact = os.environ.get("INTERACT") == "1"
if path:
try:
transport = get_transport(path)
return TrezorClientDebugLink(transport)
return TrezorClientDebugLink(transport, auto_interact=not interact)
except Exception as e:
raise RuntimeError("Failed to open debuglink for {}".format(path)) from e

else:
devices = enumerate_devices()
for device in devices:
try:
return TrezorClientDebugLink(device)
return TrezorClientDebugLink(device, auto_interact=not interact)
except Exception:
pass
else:
Expand Down

0 comments on commit 28e177c

Please sign in to comment.