Move row_length_bad into Protocol section
@@ -465,15 +465,6 @@ class Test(unittest.TestCase):
r = png.Reader(bytes=pngsuite.tbrn2c08)
list(r.asDirect()[2])[0].tostring
- def test_row_length_bad(self):
- # See https://github.com/drj11/pypng/issues/28
- writer = png.Writer(width=4, height=1, greyscale=True)
- o = BytesIO()
-
- self.assertRaises(png.ProtocolError,
- writer.write,
- o, [[1, 111, 222]])
-
def test_flat(self):
"""Test read_flat."""
import hashlib
@@ -836,6 +827,15 @@ class Test(unittest.TestCase):
# Generally, protocol errors
+ def test_row_length_bad(self):
+ # See https://github.com/drj11/pypng/issues/28
+ writer = png.Writer(width=4, height=1, greyscale=True)
+ o = BytesIO()
+
+ self.assertRaises(png.ProtocolError,
+ writer.write,
+ o, [[1, 111, 222]])
+
def test_write_palette_big(self):
"""Palette too big should raise error."""
a = (255, 255, 255)
