def test_from_txt(img): img1 = Image.fromTxt("tests/data/test_img.txt", (3, 3)) img2 = Image.fromTxt("tests/data/test_img.txt", (3, 3, 1)) assert img == img1 assert img == img2
def test_conversion_txt_gslib(): img = Image.fromTxt("tests/data/test_img.txt", (3, 3)) img.exportAsGslib("tests/data/test_img.gslib") img_test = Image.fromGslib("tests/data/test_img.gslib") assert np.alltrue(img_test == img)
def test_conversion_png_txt(): img = Image.fromPng("tests/data/test_img.png") img.exportAsTxt("tests/data/test_img2.txt") img_test = Image.fromTxt("tests/data/test_img2.txt", (3, 3)) assert np.alltrue(img_test == img)