VS Code Setup¶
VS Code setup is optional, but does offer the following advantages:
- Auto-format your Python code to conform to the repository's code standards (ruff).
- Inline linting and auto-completion (thanks to Python type hints).
- Spell-check your code and docs.
- Graphical exploration of test cases and easy test execution/debug.
Installation¶
Please refer to the Visual Studio Code docs for help with installation.
VS Code Settings file¶
The ethereum/execution-spec-tests repo includes configuration files for VS Code in the .vscode/
sub-directory:
📁 execution-test-specs/
└──📁 .vscode/
├── 📄 settings.json
├── 📄 settings.local.recommended.json
├── 📄 extensions.json
└── 📄 launch.recommended.json
By default the repository settings are applied via .vscode/settings.json
, if you want to add your own settings please edit .vscode/settings.local.recommended.json
.
To enable the recommended launch configurations:
cp .vscode/launch.recommended.json .vscode/launch.json
To additionally use and add local settings please run the following first:
cp .vscode/settings.local.recommended.json .vscode/settings.local.json
Additional VS Code Extensions¶
Open the folder in VS Code where execution-spec-tests is cloned: VS Code should prompt to install the repository's required extensions from .vscode/extensions.json
:
ms-python.python
charliermarsh.ruff
esbenp.prettier-vscode
streetsidesoftware.code-spell-checker
tamasfe.even-better-toml
Workspace Trust
Trust the execution-specs-test
repository when opening in VS Code to be prompted to install the plugins recommended via the extensions.json
file.
The .vscode/extensions.json
additionally contains a list of extensions that should be disabled:
Please ensure that these are disabled for the repo if they are installed as part of your VS Code extensions.
Configuration for Testing EVM Features Under Active Development¶
An additional step is required to enable fixture generations for features from forks that are under active development and have not been deployed to mainnet, see Filling Tests for Features under Development.