From 5fefd7b898b960669fae9468bbd6669c18fd7904 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Fri, 26 Jul 2024 03:59:39 +0200 Subject: [PATCH] Emit `ssz_static` tests for SSZ `StableContainer` / `Profile` --- tests/generators/ssz_static/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/generators/ssz_static/main.py b/tests/generators/ssz_static/main.py index 3f894ea796..db4d3f8d5b 100644 --- a/tests/generators/ssz_static/main.py +++ b/tests/generators/ssz_static/main.py @@ -7,7 +7,7 @@ from eth2spec.debug import random_value, encode from eth2spec.test.helpers.constants import TESTGEN_FORKS, MINIMAL, MAINNET from eth2spec.test.context import spec_targets -from eth2spec.utils.ssz.ssz_typing import Container +from eth2spec.utils.ssz.ssz_typing import Container, Profile, StableContainer from eth2spec.utils.ssz.ssz_impl import ( hash_tree_root, serialize, @@ -32,7 +32,12 @@ def create_test_case(rng: Random, typ, def get_spec_ssz_types(spec): return [ (name, value) for (name, value) in getmembers(spec, isclass) - if issubclass(value, Container) and value != Container # only the subclasses, not the imported base class + if ( + # only the subclasses, not the imported base class + issubclass(value, Container) and value != Container + or issubclass(value, StableContainer) and value != StableContainer + or issubclass(value, Profile) and value != Profile + ) ]