summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imgfile.py
diff options
context:
space:
mode:
authorRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>1996-12-20 21:52:29 (GMT)
committerRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>1996-12-20 21:52:29 (GMT)
commit4455cd8e19af1b3877b72ff97a0738291d30d3a0 (patch)
tree931088a3e0eafb49a0fd75173abeaee90c308bc3 /Lib/test/test_imgfile.py
parent3507f502c932585f07f46d8b21a23984329bdfa9 (diff)
downloadcpython-4455cd8e19af1b3877b72ff97a0738291d30d3a0.zip
cpython-4455cd8e19af1b3877b72ff97a0738291d30d3a0.tar.gz
cpython-4455cd8e19af1b3877b72ff97a0738291d30d3a0.tar.bz2
More and better comments.
Diffstat (limited to 'Lib/test/test_imgfile.py')
-rwxr-xr-xLib/test/test_imgfile.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/Lib/test/test_imgfile.py b/Lib/test/test_imgfile.py
index 1b1198d..8a3b91e 100755
--- a/Lib/test/test_imgfile.py
+++ b/Lib/test/test_imgfile.py
@@ -1,3 +1,7 @@
+#! /usr/bin/env python
+"""Simple test script for imgfile.c
+ Roger E. Masse
+"""
from test_support import verbose
import imgfile
@@ -5,13 +9,16 @@ import imgfile
def main():
+ # Test a 3 byte color image
testimage('test.rgb')
+
+ # Test a 1 byte greyscale image
testimage('greytest.rgb')
def testimage(name):
- """return a tuple consisting of
- image (in 'imgfile' format) width, height, size
+ """Run through the imgfile's battery of possible methods
+ on the image passed in name.
"""
import sys
@@ -22,8 +29,8 @@ def testimage(name):
# try opening the name directly
try:
- # This function returns a tuple (x, y, z) where x and y are the size of
- # the image in pixels and z is the number of bytes per pixel. Only
+ # This function returns a tuple (x, y, z) where x and y are the size
+ # of the image in pixels and z is the number of bytes per pixel. Only
# 3 byte RGB pixels and 1 byte greyscale pixels are supported.
sizes = imgfile.getsizes(name)
except imgfile.error: