pytest-notebook icon indicating copy to clipboard operation
pytest-notebook copied to clipboard

nb_diff_ignore settings in pytest.ini are being ignored

Open jgostick opened this issue 5 years ago • 4 comments

I am very excited about using this plugin. It does exactly what we need on our repo. We have a folder of jupyter notebook examples which we want to test to make sure they are up to data with changes in the main package. We point users to these examples so want to make sure they all work.

Anyway, I've got your plugin working fine with pytest, but only if I put several lines in the meta data of each notebook (eg. "nbreg": { "diff_ignore": [ ] } ). I would really rather not put data explicitly into each file, but rather put some generic statements in the pytest.ini file which apply to all notebooks. Specifically, ignoring metadata and not comparing figures, plus a few other things.

I think I followed the documentation, but nothing I put in the pytest.ini file seems to make any difference.

Here is the pytest-notebook section of my file:

nb_diff_ignore =
    /metadata
    /cells/*/execution_count
    /cells/*/outputs/*/data
    /cells/*/outputs/*/text
    /cells/*/outputs/*/data/image/png

Any suggestions?

jgostick avatar Dec 09 '19 14:12 jgostick