Skip to content

Commit 41c9057

Browse files
authored
fix(tests): Remove duplicates from tests/osaka/eip7951_p256verify_precompiles/vectors/secp256r1_test.json (#2017)
1 parent 43270a2 commit 41c9057

File tree

2 files changed

+121
-3524
lines changed

2 files changed

+121
-3524
lines changed

tests/osaka/eip7951_p256verify_precompiles/helpers.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,10 @@ def vectors_from_file(filename: str) -> List:
6060
),
6161
"rb",
6262
) as f:
63-
return [v.to_pytest_param() for v in VectorListAdapter.validate_json(f.read()).root]
63+
vectors_list = VectorListAdapter.validate_json(f.read())
64+
all_inputs = set()
65+
for vector in vectors_list.root:
66+
if vector.input in all_inputs:
67+
raise ValueError(f"Duplicate input: {vector.input.hex()}")
68+
all_inputs.add(vector.input)
69+
return [v.to_pytest_param() for v in vectors_list.root]

0 commit comments

Comments
 (0)