Issue 1384: Windows fix for inspect tests (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/45725

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 2022-04-11 14:56 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
2022-04-11 14:56:27 admin set github: 45725
2008-01-06 22:29:45 admin set keywords: - py3kversions: Python 3.0
2007-11-06 11:45:36 christian.heimes set status: open -> closedresolution: fixedmessages: + components: + Windows
2007-11-06 00:39:57 amaury.forgeotdarc set messages: +
2007-11-06 00:17:42 christian.heimes set messages: +
2007-11-05 23:12:04 amaury.forgeotdarc set files: + py3k_inspect_2.diffnosy: + amaury.forgeotdarcmessages: +
2007-11-05 21:36:20 gvanrossum set nosy: + gvanrossummessages: +
2007-11-04 18:44:55 christian.heimes create