Double space all the tests
@@ -38,6 +38,7 @@ import pngsuite
def runTest():
unittest.main(__name__)
+
def topngbytes(name, rows, x, y, **k):
"""
Convenience function for creating a PNG file "in memory" as
@@ -60,6 +61,7 @@ def topngbytes(name, rows, x, y, **k):
w.close()
return f.getvalue()
+
def _redirect_io(inp, out, f):
"""Calls the function `f` with ``sys.stdin`` changed to `inp`
and ``sys.stdout`` changed to `out`. They are restored when `f`
@@ -84,6 +86,7 @@ def _redirect_io(inp, out, f):
w.close()
return x
+
def mycallersname():
"""Returns the name of the caller of the caller of this function
(hence the name of the caller of the function in which
@@ -101,6 +104,7 @@ def mycallersname():
inspect.getouterframes(frame)[2])
return funname
+
def seqtobytes(s):
"""Convert a sequence of integers to a *bytes* instance. Good for
plastering over Python 2 / Python 3 cracks.
@@ -747,6 +751,7 @@ class Test(unittest.TestCase):
meta = dict(alpha=False, greyscale=True, bitdepth=2, planes=1)
png.write_pnm(o, w, h, pixels, meta)
+
def group(s, n):
# See http://www.python.org/doc/2.6/library/functions.html#zip
return list(zip(* [iter(s)] * n))
