From 7165932012bc107fd26c69d18c6bf466c8cd6ca6 Mon Sep 17 00:00:00 2001 From: protolambda Date: Tue, 30 Jul 2019 14:08:50 +0200 Subject: [PATCH] output list-type parts correctly --- test_libs/pyspec/eth2spec/test/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_libs/pyspec/eth2spec/test/utils.py b/test_libs/pyspec/eth2spec/test/utils.py index 6aaf14054..f02e4153b 100644 --- a/test_libs/pyspec/eth2spec/test/utils.py +++ b/test_libs/pyspec/eth2spec/test/utils.py @@ -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)