Skip to content

Commit 9e3fb03

Browse files
authored
Fix decorator order in light-client tests (#4652)
Fixes #4618. Reorders decorators so `@spec_state_test_with_matching_config` appears above `@with_config_overrides` in light-client tests.
1 parent 1b8d05f commit 9e3fb03

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

tests/core/pyspec/eth2spec/test/altair/light_client/test_data_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626

2727

2828
@with_light_client
29+
@spec_state_test_with_matching_config
2930
@with_config_overrides(
3031
{
3132
"BLOB_SCHEDULE": sample_blob_schedule(initial_epoch=1, interval=1),
3233
},
3334
emit=False,
3435
)
35-
@spec_state_test_with_matching_config
3636
@with_presets([MINIMAL], reason="too slow")
3737
def test_light_client_data_collection(spec, state):
3838
# Start test

tests/core/pyspec/eth2spec/test/altair/light_client/test_sync.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737

3838

3939
@with_light_client
40+
@spec_state_test_with_matching_config
4041
@with_config_overrides(
4142
{
4243
"BLOB_SCHEDULE": sample_blob_schedule(),
4344
},
4445
emit=False,
4546
)
46-
@spec_state_test_with_matching_config
4747
@with_presets([MINIMAL], reason="too slow")
4848
def test_light_client_sync(spec, state):
4949
# Start test
@@ -289,13 +289,13 @@ def test_light_client_sync(spec, state):
289289

290290

291291
@with_light_client
292+
@spec_state_test_with_matching_config
292293
@with_config_overrides(
293294
{
294295
"BLOB_SCHEDULE": sample_blob_schedule(),
295296
},
296297
emit=False,
297298
)
298-
@spec_state_test_with_matching_config
299299
@with_presets([MINIMAL], reason="too slow")
300300
def test_supply_sync_committee_from_past_update(spec, state):
301301
# Advance the chain, so that a `LightClientUpdate` from the past is available
@@ -329,13 +329,13 @@ def test_supply_sync_committee_from_past_update(spec, state):
329329

330330

331331
@with_light_client
332+
@spec_state_test_with_matching_config
332333
@with_config_overrides(
333334
{
334335
"BLOB_SCHEDULE": sample_blob_schedule(),
335336
},
336337
emit=False,
337338
)
338-
@spec_state_test_with_matching_config
339339
@with_presets([MINIMAL], reason="too slow")
340340
def test_advance_finality_without_sync_committee(spec, state):
341341
# Start test
@@ -423,13 +423,13 @@ def test_advance_finality_without_sync_committee(spec, state):
423423

424424

425425
@with_light_client
426+
@spec_state_test_with_matching_config
426427
@with_config_overrides(
427428
{
428429
"BLOB_SCHEDULE": sample_blob_schedule(),
429430
},
430431
emit=False,
431432
)
432-
@spec_state_test_with_matching_config
433433
@with_presets([MINIMAL], reason="too slow")
434434
def test_light_client_sync_no_force_update(spec, state):
435435
"""Test that force update does not occur before timeout threshold is reached.

tests/core/pyspec/eth2spec/test/altair/unittests/light_client/test_sync_protocol.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ def setup_test(spec, state):
3232

3333

3434
@with_light_client
35+
@spec_state_test_with_matching_config
3536
@with_config_overrides(
3637
{
3738
"BLOB_SCHEDULE": sample_blob_schedule(),
3839
},
3940
emit=False,
4041
)
41-
@spec_state_test_with_matching_config
4242
def test_process_light_client_update_not_timeout(spec, state):
4343
genesis_block, store = setup_test(spec, state)
4444

@@ -70,13 +70,13 @@ def test_process_light_client_update_not_timeout(spec, state):
7070

7171

7272
@with_light_client
73+
@spec_state_test_with_matching_config
7374
@with_config_overrides(
7475
{
7576
"BLOB_SCHEDULE": sample_blob_schedule(),
7677
},
7778
emit=False,
7879
)
79-
@spec_state_test_with_matching_config
8080
@with_presets([MINIMAL], reason="too slow")
8181
def test_process_light_client_update_at_period_boundary(spec, state):
8282
genesis_block, store = setup_test(spec, state)
@@ -111,13 +111,13 @@ def test_process_light_client_update_at_period_boundary(spec, state):
111111

112112

113113
@with_light_client
114+
@spec_state_test_with_matching_config
114115
@with_config_overrides(
115116
{
116117
"BLOB_SCHEDULE": sample_blob_schedule(),
117118
},
118119
emit=False,
119120
)
120-
@spec_state_test_with_matching_config
121121
@with_presets([MINIMAL], reason="too slow")
122122
def test_process_light_client_update_timeout(spec, state):
123123
genesis_block, store = setup_test(spec, state)
@@ -152,13 +152,13 @@ def test_process_light_client_update_timeout(spec, state):
152152

153153

154154
@with_light_client
155+
@spec_state_test_with_matching_config
155156
@with_config_overrides(
156157
{
157158
"BLOB_SCHEDULE": sample_blob_schedule(),
158159
},
159160
emit=False,
160161
)
161-
@spec_state_test_with_matching_config
162162
@with_presets([MINIMAL], reason="too slow")
163163
def test_process_light_client_update_finality_updated(spec, state):
164164
_, store = setup_test(spec, state)

0 commit comments

Comments
 (0)