mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-12 16:30:56 +00:00
tests/ui: refactor image reading
This commit is contained in:
parent
346e1e3ebc
commit
b99a6d5f6c
@ -18,9 +18,9 @@ def _image(src):
|
||||
with td():
|
||||
if src:
|
||||
# open image file
|
||||
image = open(src, "rb")
|
||||
image = src.read_bytes()
|
||||
# encode image as base64
|
||||
image = base64.b64encode(image.read())
|
||||
image = base64.b64encode(image)
|
||||
# convert output to str
|
||||
image = image.decode()
|
||||
# img(src=src.relative_to(fixture_test_path))
|
||||
|
Loading…
Reference in New Issue
Block a user