mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-04 13:52:35 +00:00
tests: fix flake8 errors in burntest
This commit is contained in:
parent
f81bc61316
commit
ddc762575d
@ -20,7 +20,7 @@ import os
|
|||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
|
||||||
from trezorlib import debuglink, device
|
from trezorlib import device
|
||||||
from trezorlib.debuglink import TrezorClientDebugLink
|
from trezorlib.debuglink import TrezorClientDebugLink
|
||||||
from trezorlib.transport import enumerate_devices, get_transport
|
from trezorlib.transport import enumerate_devices, get_transport
|
||||||
|
|
||||||
@ -31,9 +31,9 @@ def get_device():
|
|||||||
return get_transport(path)
|
return get_transport(path)
|
||||||
else:
|
else:
|
||||||
devices = enumerate_devices()
|
devices = enumerate_devices()
|
||||||
for device in devices:
|
for d in devices:
|
||||||
if hasattr(device, "find_debug"):
|
if hasattr(d, "find_debug"):
|
||||||
return device
|
return d
|
||||||
raise RuntimeError("No debuggable device found")
|
raise RuntimeError("No debuggable device found")
|
||||||
|
|
||||||
|
|
||||||
@ -48,9 +48,9 @@ i = 0
|
|||||||
while True:
|
while True:
|
||||||
# set private field
|
# set private field
|
||||||
device.apply_settings(client, use_passphrase=True)
|
device.apply_settings(client, use_passphrase=True)
|
||||||
assert client.features.passphrase_protection == True
|
assert client.features.passphrase_protection is True
|
||||||
device.apply_settings(client, use_passphrase=False)
|
device.apply_settings(client, use_passphrase=False)
|
||||||
assert client.features.passphrase_protection == False
|
assert client.features.passphrase_protection is False
|
||||||
|
|
||||||
# set public field
|
# set public field
|
||||||
label = "".join(random.choices(string.ascii_uppercase + string.digits, k=17))
|
label = "".join(random.choices(string.ascii_uppercase + string.digits, k=17))
|
||||||
|
Loading…
Reference in New Issue
Block a user