Nile plugin adding coverage reports for Cairo Smart Contracts.
Project description
# nile-coverage
> _[Nile](https://github.com/OpenZeppelin/nile) plugin adding coverage reports for Cairo Smart Contracts._
## Getting started
> :warning: WARNING > > This package requires cairo-lang >= 0.10.1. If you are using older versions, check [this](https://github.com/ericnordelo/cairo-coverage#how-to-make-it-work) section before continuing.
Install the plugin inside the virtual environment of your Nile project:
`sh (env): pip install nile-coverage `
Nile automatically detecs installed plugins using python [entry points](https://packaging.python.org/en/latest/specifications/entry-points/) feature. You should see the coverage command listed running nile, and you can run the report with:
`sh (env): nile coverage `
For a full list of options run:
`sh (env): nile coverage --help `
## Troubleshooting
### 1. Report doesn’t catch execution when multiple threads are used with [pytest-xdist](https://pypi.org/project/pytest-xdist/)
In order to solve this, pass the –single-thread option to the coverage command:
`sh (env): nile coverage -s `
### 2. How to run the coverage in a subset of the tests suite
Mark tests in with [pytest marks](https://docs.pytest.org/en/7.1.x/how-to/mark.html#mark) and use the –mark argument to run a subset of tests:
`sh (env): nile coverage -m unit `
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.1.0b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c3d39cfb2d85879cd273df0d764d67e83a3a1522296b70a875309b261d2a37f |
|
MD5 | 86801402ce4ff61c66a9f2948696fcde |
|
BLAKE2b-256 | 994355ab368187d2f7566fc3a2e176922fdeadd25f0e4125b96675bc7a28a837 |