def test_viewer_with_overlay(): img = data.coins() ov = OverlayPlugin(image_filter=sobel) viewer = ImageViewer(img) viewer += ov import tempfile _, filename = tempfile.mkstemp(suffix='.png') ov.color = 3 assert_equal(ov.color, 'yellow') viewer.save_to_file(filename) ov.display_filtered_image(img) assert_equal(ov.overlay, img) ov.overlay = None assert_equal(ov.overlay, None) ov.overlay = img assert_equal(ov.overlay, img) assert_equal(ov.filtered_image, img)