Skip to content

vyperlang/vyper / skills

vyper-compiler

Verified

Vyper smart contract compiler internals. Use when working on the Vyper compiler codebase — compilation pipeline, Venom IR, semantic analysis, code generation, testing, or contributing. Triggers on vyper compiler development, Venom passes, AST/semantics changes, codegen work, or test writing.

FileKindSize
SKILL.mdskill md4.4 KB
codegen.mdmarkdown1.1 KB
contributing.mdmarkdown7.8 KB
semantics.mdmarkdown2.3 KB
testing.mdmarkdown1.6 KB
venom.mdmarkdown2.0 KB

testing.md

View on GitHub
# Testing

## Running Tests

```bash
./quicktest.sh -m "not fuzzing"          # standard test run (-nauto by default via setup.cfg)
./quicktest.sh tests/unit/               # unit tests only
./quicktest.sh tests/functional/         # functional tests only
./quicktest.sh tests/unit/compiler/venom/ # venom unit tests
./quicktest.sh --hevm -m hevm            # hevm-based tests (needs hevm in PATH)
```

`quicktest.sh` wraps pytest with `-q -s --instafail -x` (bail on first failure).

## Test Organization

```
tests/
├── unit/           # isolated component tests
│   ├── ast/
│   ├── semantics/
│   ├── compiler/
│   │   └── venom/  # venom pass & analysis tests
│   ├── cli/
│   └── ...
├── functional/     # end-to-end compilation & execution
│   ├── builtins/
│   ├── codegen/
│   ├── grammar/
│   ├── syntax/
│   └── venom/
├── conftest.py     # shared fixtures
├── evm_backends/   # EVM execution backends for tests
└── venom_utils.py  # helpers for venom tests
```

## Key Fixtures & Helpers

- `tests/conftest.py` — main fixtures (compiler invocation, EVM backends)
- `tests/evm_backends/` — pluggable EVM execution (pyevm, pyrevm)
- `tests/venom_utils.py` — helpers for constructing Venom IR in tests

## Writing Tests

- Functional tests typically compile a Vyper snippet and execute it against an EVM backend
- Venom unit tests construct IR programmatically, run passes, and assert on the result
- Use `pytest.mark.fuzzing` for slow/fuzz tests (skipped in quick runs)
- Use `pytest.mark.hevm` for hevm-specific tests
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall