Nile plugin adding coverage reports for Cairo Smart Contracts.
Project description
nile-coverage
Nile plugin adding coverage reports for Cairo Smart Contracts.
Getting started
Install the plugin inside the virtual environment of your Nile project:
(env): pip install nile-coverage
Nile automatically detects installed plugins using python entry points feature. You should see the coverage command listed running nile
, and you can run the report with:
(env): nile coverage
For a full list of options run:
(env): nile coverage --help
Recipes
1. Run coverage in a subset of the tests suite.
Mark tests with pytest marks and use the --mark
argument to run a subset of tests:
(env): nile coverage -m unit
2. Integrate with codecov.io.
Generate a cobertura format coverage xml file named "coverage.xml" using the --xml
flag:
(env): nile coverage --xml
3. Change the default folder containing Smart Contracts.
If your Smart Contracts are in a different folder than "contracts" (Nile default), use the
--contracts-folder
flag to set the correct one:
(env): nile coverage -c src
Acknowledgements
This package uses the starknet-edu/cairo-coverage Virtual Machine override to get covered lines for the final report. Special thanks to @LucasLvy from StarkWare!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nile_coverage-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b60140ae13a9562619e98ac2a1a31beb40c260591447986e62fd6a540b10abf |
|
MD5 | 7a173aea4a120263e5f7803520eaede4 |
|
BLAKE2b-256 | 6c7d5ad327d35ed477ad0265faa69838906813c29605582fe17374b85bbe9c9b |