fomightez / cairo-jupyter

Jupyter notebooks hosted via mybinder.org where cairo works
https://mybinder.org/v2/gh/fomightez/cairo-jupyter/master?filepath=index.ipynb
3 stars 1 forks source link

Feature/pytest nbval #10

Closed stuaxo closed 6 years ago

stuaxo commented 6 years ago

This makes it possible to use pytest to check if the notebook cells change, using nbval.

At the moment it only works if you run pytest in the tests directory, as I don't know enough pytest to make this more flexible.

It just does the bare minimum, getting the cells 'text/png' representation and comparing that, so it's not a visual test at all.

I haven't tried breaking this to see what happens yet, but chucking this PR up to see what you reckon.

If it works, it could be good to add to circleci ... but I'm not sure how we balance that with ocasionally wanting to be able to change the cell output ourselves.

There are many ways this could be improved, but it definitely hits the bare minimum MVP