diff --git a/docs/writing_tests/code_standards.md b/docs/writing_tests/code_standards.md index b545872633..38d1832137 100644 --- a/docs/writing_tests/code_standards.md +++ b/docs/writing_tests/code_standards.md @@ -2,17 +2,17 @@ The Python code in the tests subdirectory `./tests` must fulfill the following checks: -| | Command | Explanation | -|---|-------------------------|---------------------------------------------------------------------------| -| 1 | `fname8 tests` | Spell check passes using the `./whitelist.txt` dictionary file. | -| 2 | `isort tests --check --diff` | Python imports ordered and arranged according to isort's standards. | -| 3 | `black tests --check --diff` | Python source must be black-formatted. | -| 4 | `flake8 tests` | Python lint and spell-checked. | -| 5 | `mypy tests` | Objects that provide typehints pass type-checking via mypy. | -| 6 | `fill` | All tests tests must execute correctly. | -| 7 | `mkdocs build --strict` | Documentation generated without warnings. | -| 8 | `pyspelling` | Markdown spell-check. | -| 9 | `markdownlint-cli2` | Markdown lint check. | +| | Command | Explanation | +|---|-------------------------|--------------------------------------------------------------------------| +| 1 | `fname8 tests` | Spell check passes using the `./whitelist.txt` dictionary file. | +| 2 | `isort tests --check --diff` | Python imports ordered and arranged according to isort's standards. | +| 3 | `black tests --check --diff` | Python source must be black-formatted. | +| 4 | `flake8 tests` | Python lint and spell-checked. | +| 5 | `mypy tests` | Objects that provide typehints pass type-checking via mypy. | +| 6 | `fill` | All tests must execute correctly. | +| 7 | `mkdocs build --strict` | Documentation generated without warnings. | +| 8 | `pyspelling` | Markdown spell-check. | +| 9 | `markdownlint-cli2` | Markdown lint check. | While this seems like a long list, a correctly configured editor (see [VS Code Setup](../getting_started/setup_vs_code.md)) essentially assures: diff --git a/docs/writing_tests/exception_tests.md b/docs/writing_tests/exception_tests.md index a30756c2f2..07568dcca0 100644 --- a/docs/writing_tests/exception_tests.md +++ b/docs/writing_tests/exception_tests.md @@ -12,7 +12,7 @@ To test for an exception, the test can use either of the following types from `e 2. [`BlockException`](../consuming_tests/exceptions.md#blockexception): To be added to the `exception` field of the `Block` object; this exception type is used when a block is expected to be invalid, but the exception is related to a block property, e.g. an invalid value of the block header. - For an example, see [`eip4844_blobs.test_excess_blob_gas.test_invalid_static_excess_blob_gas`](../tests/cancun/eip4844_blobs/test_excess_blob_gas/index.md#tests.cancun.eip4844_blobs.test_excess_blob_gas.test_invalid_static_excess_blob_gas) which raises `BlockException.INCORRECT_EXCESS_BLOB_GAS` in the case that the the `excessBlobGas` remains unchanged + For an example, see [`eip4844_blobs.test_excess_blob_gas.test_invalid_static_excess_blob_gas`](../tests/cancun/eip4844_blobs/test_excess_blob_gas/index.md#tests.cancun.eip4844_blobs.test_excess_blob_gas.test_invalid_static_excess_blob_gas) which raises `BlockException.INCORRECT_EXCESS_BLOB_GAS` in the case that the `excessBlobGas` remains unchanged but the parent blobs included are not `TARGET_BLOBS_PER_BLOCK`. Although exceptions can be combined with the `|` operator to indicate that a test vector can throw either one of multiple exceptions, ideally the tester should aim to use only one exception per test vector, and only use multiple exceptions on the rare instance when it is not possible to know which exception will be thrown because it depends on client implementation.