Skip to content

Commit

Permalink
new(tests): EOF - EIP-3540: Migrate validation tests: EIP3540/validIn…
Browse files Browse the repository at this point in the history
…validFiller.yml (#598)

* new(tests): migrate EIP3540/validInvalidFiller.yml

* update tests

* restore coverage

* rework test

* rework test

* restore coverage

* restore coverage

* fix(types): EOF V1: Container str function

* fix(tests): EOF - EIP-3540: Fix test ids

---------

Co-authored-by: Mario Vega <marioevz@gmail.com>
  • Loading branch information
chfast and marioevz authored Aug 16, 2024
1 parent 4b51585 commit ccfd9ca
Show file tree
Hide file tree
Showing 3 changed files with 403 additions and 0 deletions.
3 changes: 3 additions & 0 deletions converted-ethereum-tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
GeneralStateTests/stCreate2/call_outsize_then_create2_successful_then_returndatasize.json
GeneralStateTests/stCreate2/call_then_create2_successful_then_returndatasize.json

([#598](https://github.com/ethereum/execution-spec-tests/pull/598))
EOFTests/EIP3540/validInvalid.json

EOFTests/efValidation/EOF1_eofcreate_valid_.json
EOFTests/efValidation/EOF1_truncated_section_.json

Expand Down
9 changes: 9 additions & 0 deletions src/ethereum_test_types/eof/v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,15 @@ def __len__(self) -> int:
"""
return len(self.bytecode)

def __str__(self) -> str:
"""
Returns the name of the container if available, otherwise the bytecode of the container
as a string.
"""
if self.name:
return self.name
return str(self.bytecode)


@dataclass(kw_only=True)
class Initcode(Bytecode):
Expand Down
Loading

0 comments on commit ccfd9ca

Please sign in to comment.