diff --git a/tests/ui_tests/__init__.py b/tests/ui_tests/__init__.py index 5c035d4d2..89e53dbae 100644 --- a/tests/ui_tests/__init__.py +++ b/tests/ui_tests/__init__.py @@ -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