Example #1
0
 def test_save_load(self):
     tests = [(),
              ((4, 4), 0, True, self.palette, 2, 2, Image.NEAREST,
               [HLines(), VLines()])]
     for test in tests:
         scanner = ImageScanner(*test)
         saved = scanner.save()
         loaded = Scanner.load(saved)
         self.assertEqual(scanner, loaded)
Example #2
0
def test_image_scanner_save_load(test):
    scanner = ImageScanner(*test)
    saved = scanner.save()
    loaded = Scanner.load(saved)
    assert isinstance(loaded, ImageScanner)
    assert scanner == loaded