    def test_image_files(self):
        """
        Check that the ImageFile renderer works.
        """
        renderer = ImageFile(
            os.path.join(os.path.dirname(__file__), "globe.gif"), height=10)

        # Check renderer got all images from the file.
        count = 0
        for image in renderer.images:
            count += 1
            self.assertIsNotNone(image)
            self.assertIsNotNone(len(image) <= renderer.max_height)
        self.assertEqual(count, 11)

        # Check an image looks plausible
        image = next(renderer.images)
        self.maxDiff = None
        self.assertEqual(
            image,
            ['     sA3h3h3Hr2     ',
             '  ;:;G#99G@&3;;;r   ',
             ' :::#9&&@@G;rrrr;;3 ',
             '.:;;A&@AAGsssssrr;#H',
             '::;;;r39@srssssrr;A2',
             '.::;;rrrrr@@@@9;r;;A',
             's::;;;;rr2@@@@@@#;; ',
             ' s:::;;;;;;9&&&3;:  ',
             '   .:::;;;;9#r::2   ',
             '      s.::r:;       '])
Check that the ImageFile renderer works.
tests/renderers/test_images.py