Skip to content

Commit 62b8269

Browse files
committed
Add coverage missed reason to blake2 tests
1 parent 0db40cc commit 62b8269

File tree

1 file changed

+8
-38
lines changed

1 file changed

+8
-38
lines changed

tests/istanbul/eip152_blake2/test_blake2.py

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
REFERENCE_SPEC_GIT_PATH = ref_spec_152.git_path
2222
REFERENCE_SPEC_VERSION = ref_spec_152.version
2323

24-
25-
@pytest.mark.ported_from(
24+
pytestmark = pytest.mark.ported_from(
2625
[
2726
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts/blake2BFiller.yml",
2827
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLBlake2fFiller.json",
@@ -33,7 +32,14 @@
3332
"https://github.com/ethereum/execution-spec-tests/pull/1244",
3433
"https://github.com/ethereum/execution-spec-tests/pull/1067",
3534
],
35+
coverage_missed_reason=(
36+
"No longer used opcodes, SUB, GT, ISZERO, AND, CODESIZE, JUMP, some PUSH opcodes."
37+
"Original test calls Blake2b in ConstantinopleFix (activation test), "
38+
"which results in empty account code being triggered."
39+
),
3640
)
41+
42+
3743
@pytest.mark.valid_from("Istanbul")
3844
@pytest.mark.parametrize("call_opcode", [Op.CALL])
3945
@pytest.mark.parametrize(
@@ -427,18 +433,6 @@ def test_blake2b(
427433
state_test(env=env, pre=pre, post=post, tx=tx)
428434

429435

430-
@pytest.mark.ported_from(
431-
[
432-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts/blake2BFiller.yml",
433-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLBlake2fFiller.json",
434-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLCODEBlake2fFiller.json",
435-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts/delegatecall09UndefinedFiller.yml",
436-
],
437-
pr=[
438-
"https://github.com/ethereum/execution-spec-tests/pull/1244",
439-
"https://github.com/ethereum/execution-spec-tests/pull/1067",
440-
],
441-
)
442436
@pytest.mark.valid_from("Istanbul")
443437
@pytest.mark.parametrize("call_opcode", [Op.CALL, Op.CALLCODE])
444438
@pytest.mark.parametrize("gas_limit", [90_000, 110_000, 200_000])
@@ -552,18 +546,6 @@ def test_blake2b_invalid_gas(
552546
state_test(env=env, pre=pre, post=post, tx=tx)
553547

554548

555-
@pytest.mark.ported_from(
556-
[
557-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts/blake2BFiller.yml",
558-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLBlake2fFiller.json",
559-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLCODEBlake2fFiller.json",
560-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts/delegatecall09UndefinedFiller.yml",
561-
],
562-
pr=[
563-
"https://github.com/ethereum/execution-spec-tests/pull/1244",
564-
"https://github.com/ethereum/execution-spec-tests/pull/1067",
565-
],
566-
)
567549
@pytest.mark.valid_from("Istanbul")
568550
@pytest.mark.parametrize("call_opcode", [Op.CALL, Op.CALLCODE])
569551
@pytest.mark.parametrize("gas_limit", [Environment().gas_limit, 90_000, 110_000, 200_000])
@@ -674,18 +656,6 @@ def test_blake2b_gas_limit(
674656
)
675657

676658

677-
@pytest.mark.ported_from(
678-
[
679-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts/blake2BFiller.yml",
680-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLBlake2fFiller.json",
681-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts2/CALLCODEBlake2fFiller.json",
682-
"https://github.com/ethereum/tests/blob/v13.3/src/GeneralStateTestsFiller/stPreCompiledContracts/delegatecall09UndefinedFiller.yml",
683-
],
684-
pr=[
685-
"https://github.com/ethereum/execution-spec-tests/pull/1244",
686-
"https://github.com/ethereum/execution-spec-tests/pull/1067",
687-
],
688-
)
689659
@pytest.mark.valid_from("Istanbul")
690660
@pytest.mark.parametrize("call_opcode", [Op.CALL, Op.CALLCODE])
691661
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)