From 92916e5383ee2eb7139e52bed283bf979feb160d Mon Sep 17 00:00:00 2001 From: Carl Beekhuizen Date: Fri, 31 May 2019 13:08:42 +0200 Subject: [PATCH] Tests run with both spec versions --- test_libs/pyspec/eth2spec/test/context.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test_libs/pyspec/eth2spec/test/context.py b/test_libs/pyspec/eth2spec/test/context.py index d0869ba68..670654a92 100644 --- a/test_libs/pyspec/eth2spec/test/context.py +++ b/test_libs/pyspec/eth2spec/test/context.py @@ -110,4 +110,13 @@ def with_phase1(fn): return entry -with_all_phases = with_phase0 +def with_all_phases(fn): + """ + Decorator to run everything with all availible spec phases + """ + def entry(*args, **kw): + kw['spec'] = spec_phase0 + fn(*args, **kw) + kw['spec'] = spec_phase1 + return fn(*args, **kw) + return entry