diff options
author | Guido van Rossum <guido@python.org> | 1997-05-08 23:14:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-05-08 23:14:57 (GMT) |
commit | de554ece418b241ad5058b1e600040c0d1c01891 (patch) | |
tree | 787ca28dc2f8582e7ce7f0bb535ef865bf1c7f9f /Lib/dos-8x3/test_img.py | |
parent | 6dd87830d091673741a4aabfb0680ae5ca64c257 (diff) | |
download | cpython-de554ece418b241ad5058b1e600040c0d1c01891.zip cpython-de554ece418b241ad5058b1e600040c0d1c01891.tar.gz cpython-de554ece418b241ad5058b1e600040c0d1c01891.tar.bz2 |
The usual.
Diffstat (limited to 'Lib/dos-8x3/test_img.py')
-rw-r--r-- | Lib/dos-8x3/test_img.py | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Lib/dos-8x3/test_img.py b/Lib/dos-8x3/test_img.py index 8a3b91e..576a51c 100644 --- a/Lib/dos-8x3/test_img.py +++ b/Lib/dos-8x3/test_img.py @@ -1,13 +1,18 @@ #! /usr/bin/env python + """Simple test script for imgfile.c Roger E. Masse """ -from test_support import verbose -import imgfile +from test_support import verbose, unlink + +import imgfile, uu, os - -def main(): + +def main(): + + uu.decode(findfile('testrgb.uue'), 'test.rgb') + uu.decode(findfile('greyrgb.uue'), 'greytest.rgb') # Test a 3 byte color image testimage('test.rgb') @@ -15,6 +20,16 @@ def main(): # Test a 1 byte greyscale image testimage('greytest.rgb') + unlink('test.rgb') + unlink('greytest.rgb') + +def findfile(file): + if os.path.isabs(file): return file + import sys + for dn in sys.path: + fn = os.path.join(dn, file) + if os.path.exists(fn): return fn + return file def testimage(name): """Run through the imgfile's battery of possible methods |