earthlab / matplotcheck

A python package for checking and testing matplotlib plots. We use this for autograding student assignments but there are many other potential use cases including package testing (for packages with plots)!
https://matplotcheck.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Add notebook tests #268

Closed nkorinek closed 3 years ago

nkorinek commented 4 years ago

Added tests for the notebooks module, and fixed small issue found in remove_comments function while writing tests.

codecov[bot] commented 4 years ago

Codecov Report

Merging #268 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #268   +/-   ##
=======================================
  Coverage   85.30%   85.30%           
=======================================
  Files          22       22           
  Lines        2049     2049           
=======================================
  Hits         1748     1748           
  Misses        301      301           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9427cd4...9427cd4. Read the comment docs.

lwasser commented 4 years ago

ok i spent some more time in this module.

  1. how do we ensure that things work in a notebook? i wonder if we need to make a notebook object somehow that we can test on
  2. i think we want to rename the imports function to be something more expressive
  3. i'm unsure of how that comments function should work in a notebook. so let's play with it a bit. it may be looking for commented out code but i just don't know why kristen created that function and how it runs in a notebook.

it's worth spending a bit of time on this module to better document and then understand how it works.

don't worry @nkorinek this is really normal based on other efforts with this package. as we build tests we find issues and opportunities in the code and we make it better!

nkorinek commented 4 years ago

@lwasser this has been updated give it a look!