Skip to content

Commit 5fefd7b

Browse files
committed
Emit ssz_static tests for SSZ StableContainer / Profile
1 parent 4a15496 commit 5fefd7b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/generators/ssz_static/main.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from eth2spec.debug import random_value, encode
88
from eth2spec.test.helpers.constants import TESTGEN_FORKS, MINIMAL, MAINNET
99
from eth2spec.test.context import spec_targets
10-
from eth2spec.utils.ssz.ssz_typing import Container
10+
from eth2spec.utils.ssz.ssz_typing import Container, Profile, StableContainer
1111
from eth2spec.utils.ssz.ssz_impl import (
1212
hash_tree_root,
1313
serialize,
@@ -32,7 +32,12 @@ def create_test_case(rng: Random, typ,
3232
def get_spec_ssz_types(spec):
3333
return [
3434
(name, value) for (name, value) in getmembers(spec, isclass)
35-
if issubclass(value, Container) and value != Container # only the subclasses, not the imported base class
35+
if (
36+
# only the subclasses, not the imported base class
37+
issubclass(value, Container) and value != Container
38+
or issubclass(value, StableContainer) and value != StableContainer
39+
or issubclass(value, Profile) and value != Profile
40+
)
3641
]
3742

3843

0 commit comments

Comments
 (0)