This will finally add robust image comparison testing to proplot using matplotlib/pytest-mpl.
Inside tests, I declare several functions developed from my own ad hoc jupyter notebook tests. These will be automatically detected + run by pytest, with image comparisons carried out by pytest-mpl. Further, inside tests/test_docs.py, I dynamically create testing functions from the rst-style python files in docs using jupytext, so that pytest-mpl can perform image comparisons on the documentation examples alongside the other testing files. So, the travis CI no longer compiles the documentation with make html -- instead, the existing readthedocs workflow does this, and it should also now be enabled for new pull requests (if not, will try to figure out soon). I also use a fork of pytest-mpl to support comparing arbitrary figures created by each testing function (i.e., without explicitly returning figure objects; see this branch).
This work was done quite a while ago -- has just been sitting on my machine. Would like to merge it this spring.
This will finally add robust image comparison testing to proplot using matplotlib/pytest-mpl.
Inside
tests
, I declare several functions developed from my own ad hoc jupyter notebook tests. These will be automatically detected + run bypytest
, with image comparisons carried out bypytest-mpl
. Further, insidetests/test_docs.py
, I dynamically create testing functions from the rst-style python files indocs
usingjupytext
, so thatpytest-mpl
can perform image comparisons on the documentation examples alongside the other testing files. So, the travis CI no longer compiles the documentation withmake html
-- instead, the existing readthedocs workflow does this, and it should also now be enabled for new pull requests (if not, will try to figure out soon). I also use a fork ofpytest-mpl
to support comparing arbitrary figures created by each testing function (i.e., without explicitly returning figure objects; see this branch).This work was done quite a while ago -- has just been sitting on my machine. Would like to merge it this spring.