[Patches] [ python-Patches-1364545 ] test_cmd_line expecting English error messages

SourceForge.net noreply at sourceforge.net
Wed Nov 23 12:01:02 CET 2005


Patches item #1364545, was opened at 2005-11-23 11:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1364545&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: Open
Resolution: None
Priority: 5
Submitted By: A.B., Khalid (abkhd)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_cmd_line expecting English error messages 

Initial Comment:
Currently test_directories of test_cmd_line fails on
the latest Python 2.4.2 from svn branch and from the
svn head. The reason it seems is that the test assumes
that the local language of Windows is English and so
tries to find the string " denied" in the returned
system error messages of the commands ("python .") and
("python < .").

But while it is true that the first command ("python
.") does return an English string error message even on
so-called non-English versions of Windows, the same
does not seem to be true for the second command
("python < ."), which seems to return a locale-related
string error message. And since the latter test is
looking for the English " denied" in a non-English
language formated string, the test fails in non-English
versions of Windows.

Walter asked me to post the patch here, and assign it
to him. The patch uses subprocess and uses exitcodes
for testing. I tested the patch successfully, but only
on Windows. Although subprocess is supposed to work on
all platforms, someone'd better test this just to be
sure. I don't know what the policy for backporting is.
But if allowed, this should be backported to Python
2.4.2 at least.

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

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


More information about the Patches mailing list