I have a GTK application that draws some plots of some live data. The code is split so that one method deals with creating the plots and another one with updating the data and re-drawing said plots.
Clearly running the application allows me to see if the plots are sensible and look how I want them to look. However, this is a mechanical and visual test.
Is there a way to unit test this?
I could set a test method and mock all the calls to matplotlib then check that said calls were made. However, this feels like testing the implementation and not behaviour.
This is coming two years late, but Matplotlib (now?) seems to have a webpage that gives developer's tips for testing.
They also talk about how to write an image comparison test, for example, which might be what you're looking for.