diff options
author | Guido van Rossum <guido@python.org> | 1997-04-16 00:30:45 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-04-16 00:30:45 (GMT) |
commit | 7aa9fc5642a08cdb94b698a0610c9dca01fb4d56 (patch) | |
tree | 3dd65df0dcadabbdf1a694f2a0f49b7894e7bf70 /Lib/test/test_imageop.py | |
parent | 684480f4197cd4970321f90bd703458dbd3873cf (diff) | |
download | cpython-7aa9fc5642a08cdb94b698a0610c9dca01fb4d56.zip cpython-7aa9fc5642a08cdb94b698a0610c9dca01fb4d56.tar.gz cpython-7aa9fc5642a08cdb94b698a0610c9dca01fb4d56.tar.bz2 |
Use uuencoded test images.
Diffstat (limited to 'Lib/test/test_imageop.py')
-rwxr-xr-x | Lib/test/test_imageop.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Lib/test/test_imageop.py b/Lib/test/test_imageop.py index fc8dadf..f9108ef 100755 --- a/Lib/test/test_imageop.py +++ b/Lib/test/test_imageop.py @@ -1,14 +1,19 @@ #! /usr/bin/env python + """Test script for the imageop module. This has the side effect of partially testing the imgfile module as well. Roger E. Masse """ -from test_support import verbose -import imageop +from test_support import verbose, unlink + +import imageop, uu def main(use_rgbimg=1): + # Create binary test files + uu.decode(get_qualified_path('testrgb.uue'), 'test.rgb') + if use_rgbimg: image, width, height = getrgbimage('test.rgb') else: @@ -106,7 +111,10 @@ def main(use_rgbimg=1): # Convert a 2-bit greyscale image to an 8-bit greyscale image. if verbose: print 'grey22grey' - image = imageop.grey22grey (grey2image, width, height) + image = imageop.grey22grey (grey2image, width, height) + + # Cleanup + unlink('test.rgb') def getrgbimage(name): """return a tuple consisting of image (in 'imgfile' format but @@ -160,6 +168,6 @@ def get_qualified_path(name): name = string.joinfields(parts, os.sep) return name -# rgbimg (unlike imgfile) is portable to platforms other than SGI. So we prefer to use it. +# rgbimg (unlike imgfile) is portable to platforms other than SGI. +# So we prefer to use it. main(use_rgbimg=1) - |