Skip to content

Commit

Permalink
Emit ssz_static tests for SSZ StableContainer / Profile
Browse files Browse the repository at this point in the history
  • Loading branch information
etan-status committed Jul 26, 2024
1 parent 4a15496 commit 5fefd7b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/generators/ssz_static/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
)
]


Expand Down

0 comments on commit 5fefd7b

Please sign in to comment.