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)
def test_image_scanner_save_load(test): scanner = ImageScanner(*test) saved = scanner.save() loaded = Scanner.load(saved) assert isinstance(loaded, ImageScanner) assert scanner == loaded