classification
Title: Windows fix for inspect tests
Type: Stage:
Components: Windows Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, christian.heimes, gvanrossum
Priority: normal Keywords: patch

Created on 2007-11-04 18:44 by christian.heimes, last changed 2008-01-06 22:29 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py3k_inspect.patch christian.heimes, 2007-11-04 18:44
py3k_inspect_2.diff amaury.forgeotdarc, 2007-11-05 23:12
Messages (6)
msg57105 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-04 18:44
The patch lower()s the file names on Windows. The tests break on my
system because C:\\... != c:\\...
msg57139 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-05 21:36
Shouldn't this use os.path.normcase() instead of testing for nt and
using lower()?
msg57145 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2007-11-05 23:12
A slightly modified patch, which uses os.path.normcase before comparing
file names.
msg57146 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-06 00:17
Ah, os.path has a method for the job. I should have checked the module
before reinventing the wheel ... 

For some unknown and mysterious reasons the inspect tests are passing
again on my machine. I've purged the pyc files before I run the
unpatched test suite. Should I apply the patch anyway?
msg57150 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2007-11-06 00:39
Yes, the patch is needed.
The problem arises when you run the python executable in different ways
WITHOUT deleting the .pyc files.

Example on my machine: Note that the exact path to run python is not the
same:

>cd C:\dev\python\py3k\PCbuild8
>del /s ..\*.pyc
>c:\dev\python\py3k\PCbuild8\win32debug\python_d.exe -E -tt
../lib/test/regrtest.py -v test_inspect
[test OK]
>C:\dev\python\py3k\PCbuild8\win32debug\python_d.exe -E -tt
../lib/test/regrtest.py -v test_inspect
[test FAILED]

If I always use the same path the tests succeed.
msg57159 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-06 11:45
Applied to py3k in r58875. I'm doing a svnmerge later. Thanks again for
your help, pal!
History
Date User Action Args
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-11-06 11:45:36christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg57159
components: + Windows
2007-11-06 00:39:57amaury.forgeotdarcsetmessages: + msg57150
2007-11-06 00:17:42christian.heimessetmessages: + msg57146
2007-11-05 23:12:04amaury.forgeotdarcsetfiles: + py3k_inspect_2.diff
nosy: + amaury.forgeotdarc
messages: + msg57145
2007-11-05 21:36:20gvanrossumsetnosy: + gvanrossum
messages: + msg57139
2007-11-04 18:44:55christian.heimescreate