[Patches] [ python-Patches-1703379 ] Refactor test_frozen.py to use unittest.

SourceForge.net noreply at sourceforge.net
Tue Apr 24 02:39:16 CEST 2007

Patches item #1703379, was opened at 2007-04-18 21:49
Message generated for change (Comment added) made by jseutter
You can respond by visiting: 

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: Neal Norwitz (nnorwitz)
Summary: Refactor test_frozen.py to use unittest.

Initial Comment:
This patch refactors test_frozen.py to use unittest.  When this patch is applied, Lib/test/output/test_frozen can be removed.

I am not sure if the last test case is named appropriately.  I named it testImportNonexistentFunction because I believe the code is trying to import a function __phello__.foo, which does not exist.  I may be mistaken.


>Comment By: Jerry Seutter (jseutter)
Date: 2007-04-23 18:39

Logged In: YES 
Originator: YES

Thanks for the input, guys.  See version 2 of the patch which should
resolve these issues.

Question:  Why doesn't regrtest give an error if it doesn't run tests?
File Added: refactor_test_frozen.py.patch


Comment By: Ronald Oussoren (ronaldoussoren)
Date: 2007-04-19 00:18

Logged In: YES 
Originator: NO

As Neal wrote sys.platform == 'mac' is of OS9, which isn't supported
anymore by Python (or Apple for that matter).  The special-case for
platform == 'mac' should be removed altoghether and not replaced by a check
for OSX because OSX is basically just another unix platform and should
therefore support freezing.


Comment By: Neal Norwitz (nnorwitz)
Date: 2007-04-19 00:08

Logged In: YES 
Originator: NO

Thanks for the patch!

It looks pretty good, but there is one problem I see.  There should be a
test_main() function for this to work from regrtest.  For example, take a
look in Lib/test/test_bool.py.  Also, I don't think you need to seek(0)
before getting the value from sys.stdout (ie, cStringIO instance).

I don't think you need to support sys.platform == 'mac'.  That was for Mac
OS 9 which is no longer supported (see PEP 11).  Mac OS 10 has sys.platform
== 'darwin'.  If you're interested, it would be good to produce a patch to
remove all (10+) occurrences of comparing sys.platform with mac.

I'm assigning this to Ronald just so he can verify the Mac OS 9 issue. 
Ronald, please comment and then unassign or assign to me.


You can respond by visiting: 

More information about the Patches mailing list