output list-type parts correctly

This commit is contained in:
protolambda 2019-07-30 14:08:50 +02:00
parent ccf472af68
commit 7165932012
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
1 changed files with 2 additions and 2 deletions

View File

@ -46,10 +46,10 @@ def vector_test(description: str = None):
yield key, 'ssz', value
elif isinstance(value, list) and all([isinstance(el, (SSZValue, bytes)) for el in value]):
for i, el in enumerate(value):
if isinstance(value, SSZValue):
if isinstance(el, SSZValue):
yield f'{key}_{i}', 'data', encode(el)
yield f'{key}_{i}', 'ssz', serialize(el)
elif isinstance(value, bytes):
elif isinstance(el, bytes):
yield f'{key}_{i}', 'data', encode(el)
yield f'{key}_{i}', 'ssz', el
yield f'{key}_count', 'meta', len(value)