[Patches] [ python-Patches-440144 ] Tests and minor bugfix for uu module

noreply@sourceforge.net noreply@sourceforge.net
Wed, 11 Jul 2001 14:45:39 -0700


Patches item #440144, was opened at 2001-07-10 10:44
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=440144&group_id=5470

Category: library
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Nick Mathewson (nickm)
Assigned to: Tim Peters (tim_one)
Summary: Tests and minor bugfix for uu module

Initial Comment:
Inspired by a Post by Tim to c.l.py this morning, I've
decided to try my hand at writing real test cases for
some of the modules formerly tested only by
test_sundry.py. This is my first attempt: a set of
tests for the uu.py module.

In the process of writing the tests, I found a minor
bug in uu: its tests for a missing 'end' line would
never trigger.

Files included are: a patch for uu.py and
test_sundry.py, a new test_uu.py file, and an output
file for test_uu.



----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2001-07-11 14:45

Message:
Logged In: YES 
user_id=31435

This took a bit of work to run on Windows.  The "pass a 
bare file name" interface is deprecated, in part because 
it's impossible to get this to work correctly x-platform 
unless the caller opens file objects with the correct text-
vs-binary mode distinctions.  We also have a (possibly 
undocumented?) convention that all temp files have names 
based on test_support.TESTFN, and that we don't muck with 
other directories.

After making those changes, I gratefully checked it in.  
Thanks again!

Lib/test/test_sundry.py, new revision: 1.5
Lib/test/test_uu.py, initial revision: 1.1


----------------------------------------------------------------------

Comment By: Nick Mathewson (nickm)
Date: 2001-07-10 22:07

Message:
Logged In: YES 
user_id=499

I've added a new version of test_uu.py that seems to do the
right thing.  (I haven't figured out how to make Sourceforge
replace the old ones, if such is possible.)   As you said,
test_uu is now unneeded.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-07-10 21:09

Message:
Logged In: YES 
user_id=31435

Thank you, Nick!

Since we hope to convert the entire test suite to a mix of 
doctest and unittest eventually, and those don't 
use "expected output" files, I'd like you to change this 
test to stop needing an expected-output file.  You can do 
this easily, by importing "verbose" from test_support too, 
and putting the existing instances of e.g.

print '1. encode file->file'

under the protection of

if verbose:

Then the new test_uu isn't needed at all.

The bug you found in uu.py is gross!  Thanks for that too.  
I applied that part of the patch to the source tree, as

Lib/uu.py, new revision: 1.17

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=440144&group_id=5470