Skip to content

Commit 3fc3792

Browse files
authored
feat(docs/tests): EOF: Update tracker, add unimplemented tests (#773)
* feat(types/eof): Allow skipping joining same-type sections in header * refactor(tests): refactor `container.py` into `test_container_validation.py` * fix(docs): EOF tracker updates * fix(docs/tests): more EOF tracker updates * fix(docs): minor typo
1 parent 0a42a18 commit 3fc3792

File tree

5 files changed

+1169
-842
lines changed

5 files changed

+1169
-842
lines changed

src/ethereum_test_types/eof/v1/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ class Container(CopyValidateModel):
365365
Body: type section first, all code sections, data section(s), last
366366
container sections
367367
"""
368+
skip_join_concurrent_sections_in_header: bool = False
369+
"""
370+
Skip joining concurrent sections in the header (code and container)
371+
"""
368372
validity_error: EOFExceptionInstanceOrList | str | None = None
369373
"""
370374
Optional error expected for the container.
@@ -435,7 +439,10 @@ def bytecode(self) -> bytes:
435439
# Join headers of the same kind in a list of lists, only if they are next to each other
436440
concurrent_sections: List[List[Section]] = [[header_sections[0]]]
437441
for s in header_sections[1:]:
438-
if s.kind == concurrent_sections[-1][-1].kind:
442+
if (
443+
s.kind == concurrent_sections[-1][-1].kind
444+
and not self.skip_join_concurrent_sections_in_header
445+
):
439446
concurrent_sections[-1].append(s)
440447
else:
441448
concurrent_sections.append([s])

0 commit comments

Comments
 (0)