[Patches] [ python-Patches-1520904 ] Fix tests that assume they can write to Lib/test

SourceForge.net noreply at sourceforge.net
Thu Jun 7 05:03:43 CEST 2007


Patches item #1520904, was opened at 2006-07-12 00:53
Message generated for change (Comment added) made by dgreiman
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1520904&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.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Douglas Greiman (dgreiman)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix tests that assume they can write to Lib/test

Initial Comment:
A number of bsddb tests, as well as test_tarfile,
create temporary files in Lib/ or
{prefix}/lib/pythonX.Y/ .  This change uses
tempfile.gettempdir() instead.

Tested on RedHat 9.0 Linux on x86.


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

>Comment By: Douglas Greiman (dgreiman)
Date: 2007-06-07 03:03

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

test_tarfile.py was independently fixed by rev 54335.  Closing as fixed.

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

Comment By: Björn Lindqvist (sonderblade)
Date: 2007-06-06 16:03

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

I think the submitter is referring to the ./Lib/test/testtar.tar file,
which one could guess is created when you run test_tarfile.py. But that
file is distributed with Python and AFAICT, test_tarfile.py doesn't create
temporary files in bad directories. So I think it is safe to close this
patch. 

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

Comment By: A.M. Kuchling (akuchling)
Date: 2007-01-05 15:52

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

Committed the Lib/bsddb changes to the trunk in rev. 53264; thanks! 

That leaves only the tarfile change to commit, but I'd like to understand
why it's necessary first.


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

Comment By: A.M. Kuchling (akuchling)
Date: 2007-01-05 15:14

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

Can you clarify in what cases test_tarfile writes to the current
directory?


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

Comment By: Matt Fleming (splitscreen)
Date: 2006-08-31 11:07

Message:
Logged In: YES 
user_id=1126061

This looks fine to me, and a worthwhile change.

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

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


More information about the Patches mailing list