File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/ethereum_test_tools/spec/eof Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,26 @@ class EOFStateTest(EOFTest):
295295 FixtureFormats .BLOCKCHAIN_TEST_HIVE ,
296296 ]
297297
298+ @model_validator (mode = "before" )
299+ @classmethod
300+ def check_container_type (cls , data : Any ) -> Any :
301+ """
302+ Check if the container exception matches the expected exception.
303+ """
304+ if isinstance (data , dict ):
305+ container = data .get ("data" )
306+ deploy_tx = data .get ("deploy_tx" )
307+ container_kind = data .get ("container_kind" )
308+ if deploy_tx is None :
309+ if (
310+ container is not None
311+ and isinstance (container , Container )
312+ and "kind" in container .model_fields_set
313+ and container .kind == ContainerKind .INITCODE
314+ ) or (container_kind is not None and container_kind == ContainerKind .INITCODE ):
315+ data ["deploy_tx" ] = True
316+ return data
317+
298318 @classmethod
299319 def pytest_parameter_name (cls ) -> str :
300320 """
You can’t perform that action at this time.
0 commit comments