well... ``plt.close`` is used throughout the test module; it seems to me that ``_check_plot_works`` serves the same purpose but it saves the plot to a temporary file in order to cleanup. 

BTW: Matplotlib has a cleanup decorator that get rid of side effects in test code ( http://matplotlib.org/devel/testing.html )