]> granicus.if.org Git - python/commitdiff
More and better comments.
authorRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>
Fri, 20 Dec 1996 21:52:29 +0000 (21:52 +0000)
committerRoger E. Masse <rmasse@newcnri.cnri.reston.va.us>
Fri, 20 Dec 1996 21:52:29 +0000 (21:52 +0000)
Lib/test/test_imgfile.py

index 1b1198de541686cdc6168847ae730917298d0963..8a3b91edfda15870044634632fbbbcde55dd8c5c 100755 (executable)
@@ -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: