@@ -15,6 +15,9 @@ SSZ artifacts (hash-addressed to avoid duplication).
1515
1616## Usage and example test
1717
18+ You can find this example in ` tests/infra/trace/test_example_slots_2.py ` :
19+
20+
1821``` python
1922from tests.infra.trace.decorator import spec_trace
2023
@@ -29,11 +32,10 @@ def test_linear_sanity_slots_222(
2932 spec.process_slot(state)
3033```
3134
32- This can, for example, be put into e.g.
33- ` tests/core/pyspec/eth2spec/test/gloas/sanity/test_slots_2.py ` and then can be
34- run with something like
35+ Example of using example test with reftests:
3536
3637``` bash
38+ cp -v tests/infra/trace/test_example_slots_2.py tests/core/pyspec/eth2spec/test/gloas/sanity/test_slots_2.py
3739make reftests fork=gloas runner=sanity k=linear_sanity_slots_222 verbose=true
3840```
3941
@@ -93,8 +95,8 @@ results. A decorator is used to set things up. Some simple pydantic models are
9395used for the trace file structure and some sanitation/formatting.
9496
9597From a consumer standpoint (i.e. test runner) new tests using this decorator
96- behave differently and are being detected by a new data type yielded (a
97- pydantic model instance). Some logic was added to `execute_test` in
98+ behave differently and are being detected by a new data type yielded (a pydantic
99+ model instance). Some logic was added to `execute_test` in
98100` tests/core/pyspec/eth2spec/gen_helpers/gen_base/gen_runner.py` to catch that
99101new case and apply new serialization method.
100102
@@ -118,6 +120,9 @@ Some cleanup and polishing is still required.
118120
119121Typing could be improved.
120122
123+ More example tests showcasing new features (or potentially some actually
124+ needed tests that were waiting for this) could be added.
125+
121126# # Credits
122127
123128Thanks to Leo for the initial idea and guidance, and to all the reviewers who
0 commit comments