Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Writes and runs fast in-memory pytest tests for GenLayer intelligent contracts without a server.
14% 100%+86 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 3 of 22 without it.
3 of 3 safety checks passed
Not used yet
Write fast, in-memory tests for intelligent contracts. No server, no Docker — tests run in ~30-50ms.
pytest tests/direct/ -v
pytest tests/direct/test_specific.py -v
pytest tests/direct/test_specific.py::test_one_case -v
Available from genlayer-test pytest plugin:
def test_example(direct_vm, direct_deploy, direct_alice, direct_bob):
# direct_vm — VMContext with cheatcodes
# direct_deploy — deploy a contract file
# direct_alice — test address
# direct_bob — test address
pass
All fixtures: direct_vm, direct_deploy, direct_alice, direct_bob, direct_charlie, direct_owner, direct_accounts
def test_set_and_get(direct_vm, direct_deploy, direct_alice):
contract = direct_deploy("contracts/my_contract.py")
direct_vm.sender = direct_alice
contract.set_data("hello")
result = contract.get_data(direct_alice)
assert result == "hello"
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.