[ python-Bugs-1017546 ] test_inspect.py fails to clean up upon failure

SourceForge.net noreply at sourceforge.net
Fri Aug 27 14:20:58 CEST 2004


Bugs item #1017546, was opened at 2004-08-27 13:20
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1017546&group_id=5470

Category: Build
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael (ms_)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_inspect.py fails to clean up upon failure

Initial Comment:
When test_inspect.py encounters a failure in the code it's testing 
it fails to clean up its temporary files upon exit. This causes 
spurious errors for other tests when debugging. 
 
eg: force a test to fail by changing test_inspect.py such that this: 
test(inspect.getsource(mod2.wrapped) == sourcerange(13, 16), 
"inspect.getsource(mod.wrapped)") 
 
Is replaced with: 
test(inspect.getsource(mod2.wrapped) != sourcerange(13, 16), 
"inspect.getsource(mod.wrapped)") 
 
Clearly this should only cause test_inspect.py to fail, however: 
# ./python Lib/test/regrtest.py test_inspect test_posixpath 
test_inspect 
test test_inspect failed -- inspect.getsource(mod.wrapped) 
test_posixpath 
test test_posixpath failed -- Traceback (most recent call last): 
  File 
"/home/michaels/Python/Cvs/python/dist/src/Lib/test/test_posixpath.py", 
line 148, in test_islink 
    os.symlink(test_support.TESTFN + "1", test_support.TESTFN + 
"2") 
OSError: [Errno 17] File exists 
 
2 tests failed: 
    test_inspect test_posixpath 
 
In this example the reason why test_posixpath failed is due to the 
temporary files left behind by the failed test_inspect. 

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

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


More information about the Python-bugs-list mailing list