def test_flood_fill_partition(): data = [ [0, 0, 0], [1, 1, 1], [0, 0, 0], ] img = Image.from_data(data) flood_fill(img, 0, 0, 5) assert img.to_data() == [ [5, 5, 5], [1, 1, 1], [0, 0, 0], ]
def test_from_empty_image(): assert Image.from_data([]).size == (0, 0)