Skip to content

Commit

Permalink
docs: update screenshots & fix eip ref spec section (ethereum#176)
Browse files Browse the repository at this point in the history
* docs: update eip spec version checking section for ethereum#155

* docs: update screenshots for restructuring/renaming

* docs: fix link to example after folder restructure
  • Loading branch information
danceratopz authored Jun 28, 2023
1 parent b6cbb30 commit 325a3e5
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 6 deletions.
Binary file modified docs/getting_started/img/pytest_collect_only.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/getting_started/img/pytest_run_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified docs/getting_started/img/vs_code_executing_tests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified docs/getting_started/img/vs_code_exploring_tests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/tutorials/state_transition.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The most effective method of learning how to write tests is to study a couple of

### Yul Test

You can find the source code for the Yul test [here](https://github.com/ethereum/execution-spec-tests/tree/main/tests/example/test_example.py).
You can find the source code for the Yul test in [tests/homestead/yul/test_yul_example.py](../tests/homestead/yul/test_yul_example/index.md).
It is the spec test equivalent of this [static test](https://github.com/ethereum/tests/blob/develop/src/GeneralStateTestsFiller/stExample/yulExampleFiller.yml).

Lets examine each section.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/writing_tests/reference_specification.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Referencing an EIP Spec Version

An Ethereum Improvement Proposal (from [ethereum/EIPs](https://github.com/ethereum/EIPs/tree/master/EIPS)) and its SHA digest can be directly referenced within a python test module in order to check whether the test implementation could be out-dated. If the SHA of the file in the remote repo changes, the test framework will issue a warning in its summary section.

Test cases located underneath `./tests/eips/` _must_ define a reference spec version.
An Ethereum Improvement Proposal ([ethereum/EIPs](https://github.com/ethereum/EIPs/tree/master/EIPS)) and its SHA digest can be directly referenced within a python test module in order to check whether the test implementation could be out-dated. The test framework automatically generates tests for every module that defines a spec version. If the spec is out-of-date because the SHA of the specified file in the remote repo changes, the corresponding `test_eip_spec_version()` test fails.

<figure markdown>
![Examples of warnings in the test framework's console output when an EIP is outdated or not specified](./img/reference_spec_warning_console_output.png){ width=auto align=center}
![Test framework summary for a failing EIP spec version test](./img/eip_reference_spec_console_output.png){ width=auto align=center}
`<-snip->`
![EIP spec version test fail](./img/eip_reference_spec_console_output_fail.png){ width=auto align=center}
</figure>

!!! info ""
Expand All @@ -31,7 +31,7 @@ This check accomplished by adding the following two global variables anywhere in
| Variable Name | Explanation |
|-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `REFERENCE_SPEC_GIT_PATH` | The relative path of the EIP markdown file in the [ethereum/EIPs](https://github.com/ethereum/EIPs/) repository, e.g. "`EIPS/eip-1234.md`" |
| `REFERENCE_SPEC_VERSION` | The SHA hash of the latest version of the file retrieved from the Github API:<br>`https://api.github.com/repos/ethereum/EIPs/contents/EIPS/eip-<EIP Number>.md` |
| `REFERENCE_SPEC_VERSION` | The SHA hash of the latest version of the file retrieved from the Github API:<br>`https://api.github.com/repos/ethereum/EIPs/contents/EIPS/eip-<EIP Number>.md` |

## Example

Expand Down

0 comments on commit 325a3e5

Please sign in to comment.