mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
tests/ui: rename also tested fixtures
This commit is contained in:
parent
3a035a0ef8
commit
2ceeacb5db
@ -81,9 +81,12 @@ def _process_recorded(screen_path):
|
||||
digest = _hash_files(records)
|
||||
with open(screen_path / "../hash.txt", "w") as f:
|
||||
f.write(digest)
|
||||
_rename_records(screen_path)
|
||||
|
||||
|
||||
def _rename_records(screen_path):
|
||||
# rename screenshots
|
||||
for index, record in enumerate(sorted(records)):
|
||||
for index, record in enumerate(sorted(screen_path.iterdir())):
|
||||
filename = screen_path / "{:08}.png".format(index)
|
||||
record.replace(filename)
|
||||
|
||||
@ -107,6 +110,8 @@ def _process_tested(screen_path, test_name):
|
||||
with open(hash_file, "r") as f:
|
||||
expected_hash = f.read()
|
||||
|
||||
_rename_records(screen_path)
|
||||
|
||||
records = sorted(screen_path.iterdir())
|
||||
actual_hash = _hash_files(records)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user