mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-19 23:19:28 +00:00
organize test-case-part explanation better
This commit is contained in:
parent
f5e404298b
commit
bdebfe31df
@ -24,12 +24,18 @@ Options:
|
||||
Test providers loading other configs will be ignored. If none are specified, no config will be ignored.
|
||||
```
|
||||
|
||||
`gen_from_tests`: A util to derive tests from a tests source file.
|
||||
## `gen_from_tests`
|
||||
|
||||
This is an util to derive tests from a tests source file.
|
||||
|
||||
This requires the tests to yield test-case-part outputs. These outputs are then written to the test case directory.
|
||||
Yielding data is illegal in normal pytests, so it is only done when in "generator mode".
|
||||
This functionality can be attached to any function by using the `vector_test()` decorator found in `ethspec/tests/utils.py`.
|
||||
|
||||
## Test-case parts
|
||||
|
||||
Test cases consist of parts, which are yielded to the base generator one by one.
|
||||
|
||||
The yielding pattern is:
|
||||
|
||||
2 value style: `yield <key name> <value>`. The kind of output will be inferred from the value by the `vector_test()` decorator.
|
||||
|
Loading…
x
Reference in New Issue
Block a user