From 63c9e5ea56b1daa725d2d9ee9a1e368adc9d64d1 Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Tue, 16 Nov 2021 00:15:39 +0800 Subject: [PATCH] Minor refactoring and add comments --- tests/core/pyspec/eth2spec/test/context.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index 7f7c6bf28..184c0d609 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -435,12 +435,10 @@ def with_phases(phases, other_phases=None): _other_phases = [ALL_FORK_UPGRADES[phase]] ret = _run_test_case_with_phases(fn, _phases, _other_phases, kw, args, is_fork_transition=True) else: - # When running pytest, go through `fork_metas` + # When running pytest, go through `fork_metas` instead of using `phases` for fork_meta in fork_metas: - pre_fork_name = fork_meta.pre_fork_name - post_fork_name = fork_meta.post_fork_name - _phases = [pre_fork_name] - _other_phases = [post_fork_name] + _phases = [fork_meta.pre_fork_name] + _other_phases = [fork_meta.post_fork_name] ret = _run_test_case_with_phases(fn, _phases, _other_phases, kw, args, is_fork_transition=True) else: ret = _run_test_case_with_phases(fn, phases, other_phases, kw, args)