[Patches] [ python-Patches-1670993 ] Refactor test_threadedtempfile.py to use unittest.

SourceForge.net noreply at sourceforge.net
Sun Mar 11 18:59:51 CET 2007


Patches item #1670993, was opened at 2007-02-28 10:41
Message generated for change (Comment added) made by collinwinter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1670993&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tests
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jerry Seutter (jseutter)
Assigned to: Collin Winter (collinwinter)
Summary: Refactor test_threadedtempfile.py to use unittest.

Initial Comment:
This patch turns test_threadedtempfile.py into a unittest test file.  There should be no changes in what the file tests.  Input on this patch is welcome before I go too far on more of the old test files.


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

>Comment By: Collin Winter (collinwinter)
Date: 2007-03-11 13:59

Message:
Logged In: YES 
user_id=1344176
Originator: NO

One question before I apply this: why did you leave

if t.error_count:
     print '%s errors:\n%s' % (t.getName(), t.errors.getvalue())

in ThreadedTempFileTest.test_main()? Why not make it some kind of
assertion?

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

Comment By: Collin Winter (collinwinter)
Date: 2007-03-06 12:24

Message:
Logged In: YES 
user_id=1344176
Originator: NO

They can stay out; I just wanted to know the reason. This patch looks good
to me.

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

Comment By: Jerry Seutter (jseutter)
Date: 2007-03-06 00:07

Message:
Logged In: YES 
user_id=1727609
Originator: YES

I removed the -t/-f options mostly because in the short time I spent
trying to handle both -t/-f and unittest.main(), it seemed like the options
were messing up unittest.  I asked about removing the command line
processing on this file at the PyCon sprint and the people there thought it
would be okay to remove them.  Their argument was that the files that match
output to the output/ directory haven't been refactored in a long time,
probably aren't maintained much (other than when they break), and probably
aren't used much.  Since the intended audience of this file is a developer,
they wouldn't have a difficult time manually changing the global variables
for this setting located at the top of the file.

Having said that, if someone uses this functionality, I'll try adding it
back in.  Thoughts?

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

Comment By: Collin Winter (collinwinter)
Date: 2007-03-05 19:16

Message:
Logged In: YES 
user_id=1344176
Originator: NO

Why did you get rid of the -t/-f options?

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

Comment By: Jerry Seutter (jseutter)
Date: 2007-02-28 13:40

Message:
Logged In: YES 
user_id=1727609
Originator: YES

Lib/test/output/test_threadedtempfile should also be removed when this
patch is applied.

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

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


More information about the Patches mailing list