ethereum / ethereum/execution-specs
✨(testinit): add support for parametrized tests and different test types
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 505
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 116
Description
Based on ethereum/execution-spec-tests#926, we could add an further options to add:
0. All supported test formats: `state_test`/`state_test_only`, `blockchain_test`/`blockchain_test_engine`, `eof_test`.
1. Basic test parameterization to the generated test. For example:
```python
@pytest.mark.parametrize(
("param_1", "param_2"),
(
pytest.param(param_1, param_2, id="test_id_1"),
pytest.param(param_1, param_2, id="test_id_2"),
),
)
def (
state_test: StateTestFiller,
pre: Alloc,
param_1,
param_2
):
pass
```
Typehints for the parameters could be tricky )) But it's ok if new users don't add them - maintainers can help later in the PR.
2. Optional creation of a transition test for a `blockchain_test`.
3. Exception tests.
Contributor guide
Assessment
This issue has not been assessed yet.