You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 🔀 Update EIP-7251 according to [spec updates](https://github.com/ethereum/EIPs/pull/9127) ([#1024](https://github.com/ethereum/execution-spec-tests/pull/1024)).
69
69
- 🔀 Update EIP-7002 according to [spec updates](https://github.com/ethereum/EIPs/pull/9119) ([#1024](https://github.com/ethereum/execution-spec-tests/pull/1024)).
70
70
- 🐞 fix(consume): allow absolute paths with `--evm-bin` ([#1052](https://github.com/ethereum/execution-spec-tests/pull/1052)).
In this example, the test will be skipped if `tx_type` is equal to 1 by returning a `pytest.mark.skip` marker, and return `None` otherwise.
273
273
274
-
## Custom Fork Covariant Markers
274
+
## `@pytest.mark.parametrize_by_fork`
275
275
276
-
Custom fork covariant markers can be created by using the `fork_covariant_parametrize` decorator.
276
+
A test can be dynamically parametrized based on the fork using the `parametrize_by_fork` marker.
277
277
278
-
This decorator takes three arguments:
278
+
This marker takes two positional arguments:
279
279
280
-
-`parameter_names`: A list of parameter names that will be parametrized using the custom function.
281
-
-`fn`: A function that takes the fork as parameter and returns a list of values that will be used to parametrize the test.
282
-
-`marks`: A marker, list of markers, or a lambda function that can be used to add additional markers to the test.
280
+
-`argnames`: A list of parameter names that will be parametrized using the custom function.
281
+
-`fn`: A function that takes the fork as parameter and returns a list of values that will be used to parametrize the test at that specific fork.
282
+
283
+
And one keyword argument:
284
+
285
+
-`marks` (optional): A marker, list of markers, or a lambda function that can be used to add additional markers to the generated tests.
286
+
287
+
The marked test function will be parametrized by the values returned by the `fn` function for each fork.
288
+
289
+
If the parameters that are being parametrized is only a single parameter, the return value of `fn` should be a list of values for that parameter.
290
+
291
+
If the parameters that are being parametrized are multiple, the return value of `fn` should be a list of tuples/lists, where each tuple contains the values for each parameter.
283
292
284
293
```python
285
294
import pytest
286
295
287
-
from pytest_plugins import fork_covariant_parametrize
0 commit comments