mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 23:40:58 +00:00
fix(tests): properly include tests whose expected hash is missing
This commit is contained in:
parent
97f49cf336
commit
e952a301d6
@ -54,9 +54,6 @@ def _hash_files(path):
|
||||
|
||||
|
||||
def _process_tested(fixture_test_path, test_name):
|
||||
expected_hash = FILE_HASHES.get(test_name)
|
||||
if expected_hash is None:
|
||||
raise ValueError("Hash for '%s' not found in fixtures.json" % test_name)
|
||||
PROCESSED.add(test_name)
|
||||
|
||||
actual_path = fixture_test_path / "actual"
|
||||
@ -65,6 +62,10 @@ def _process_tested(fixture_test_path, test_name):
|
||||
|
||||
_rename_records(actual_path)
|
||||
|
||||
expected_hash = FILE_HASHES.get(test_name)
|
||||
if expected_hash is None:
|
||||
pytest.fail(f"Hash of {test_name} not found in fixtures.json")
|
||||
|
||||
if actual_hash != expected_hash:
|
||||
file_path = testreport.failed(
|
||||
fixture_test_path, test_name, actual_hash, expected_hash
|
||||
|
Loading…
Reference in New Issue
Block a user