feat(pytest): enable piping of fill
's json to consume rlp
#26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗒️ Description
This allows a user to pipe the JSON generated by
fill
directly toconsume rlp
without writing any intermediate files.For example:
fill --output=stdout --fork=Merge | consume rlp -v
This is bit tricky as both commands are pytest-based and pytest is not designed for this purpose. Therefore, the click interface modifies command-line options:
fill
based on whether--output=stdout
is set (in order to get pytest to not output anything else on its stdout). I didn't manage to add flags dynamically within a plugin. But perhaps this method is less hacky??! 🤣consume rlp
if it detects that it's receiving input on stdin.🔗 Related Issues
This could be an alternative solution to ethereum#324.
✅ Checklist
These should be ticked off in the main PR in execution-spec-tests: https://github.com/ethereum/execution-spec-tests/discussions
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.