From 82ff974090638cb966771defd6ee36d3e4210065 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Mon, 12 Dec 2022 12:15:27 +0100 Subject: [PATCH] Emit config before calling test to ignore changes --- tests/core/pyspec/eth2spec/test/context.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index b1f608d7b..4bddaba1c 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -617,13 +617,13 @@ def with_config_overrides(config_overrides, emitted_fork=None, emit=True): output_config = output kw['phases'] = phases - # Run the function - out = fn(*args, spec=spec, **kw) - # Emit requested spec (with overrides) if emit: yield 'config', 'cfg', output_config + # Run the function + out = fn(*args, spec=spec, **kw) + # If it's not returning None like a normal test function, # it's generating things, and we need to complete it before setting back the config. if out is not None: