Guillochon
Guillochon

Reputation: 1111

Testing Jupyter/iPython with coveralls?

I'd like to add some Jupyter notebooks to my coverage tests. It appears the way to do this might be to convert the notebooks via nbconvert, then testing the converted notebooks, but python doesn't know about 'get_ipython' unless I run with ipython, which I don't know how to invoke with the coverage command. Anyone have any ideas here?

Upvotes: 4

Views: 1023

Answers (1)

marscher
marscher

Reputation: 830

There is a plugin for evaluating notebooks with PyTest: nbval, which supports measuring the coverage during notebook execution.

Note that you also might need pytest-cov to enable pytest collecting coverage data.

Upvotes: 2

Related Questions