See [cython tracing](https://cython.readthedocs.io/en/latest/src/tutorial/profiling_tutorial.html#enabling-coverage-analysis) and [coverage](https://coverage.readthedocs.io/en/7.6.10/) Need to add `.coveragerc`: ``` [run] plugins = Cython.Coverage ``` steps are: - add `# cython: linetrace=True` to top of cython `.pyx` files (note this also enables profiling, adding slight perf penalty) - `export CFLAGS="-DCYTHON_TRACE_NOGIL=1"` before `pip install`ing - run `coverage run -m unittest discover` - run `cython --annotate-coverage coverage.xml idlbridge/_core.pyx` or equivalent if this file moves (e.g. in 20) - run `coverage html` - browse coverage in `htmlcov/index.html`
See cython tracing and coverage
Need to add
.coveragerc:steps are:
# cython: linetrace=Trueto top of cython.pyxfiles (note this also enables profiling, adding slight perf penalty)export CFLAGS="-DCYTHON_TRACE_NOGIL=1"beforepip installingcoverage run -m unittest discovercython --annotate-coverage coverage.xml idlbridge/_core.pyxor equivalent if this file moves (e.g. in 20)coverage htmlhtmlcov/index.html