[Patches] [ python-Patches-544740 ] test_commands test fails under Cygwin

noreply@sourceforge.net noreply@sourceforge.net
Mon, 02 Sep 2002 07:14:31 -0700


Patches item #544740, was opened at 2002-04-16 18:00
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=544740&group_id=5470

Category: Tests
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jason Tishler (jlt63)
Assigned to: Martin v. Löwis (loewis)
Summary: test_commands test fails under Cygwin

Initial Comment:
The Python 2.2.1 test_commands regression test
fails under Cygwin 1.3.10 because the regular
expression is pickier now and because Cygwin can
have spaces in user and/or group names. See the
following for some more details:

http://cygwin.com/ml/cygwin/2002-04/msg00774.html

and a workaround.

I'm submitting this as a bug report instead of a
patch because I don't know the best way to fix
this issue.  Can test_commands use numeric IDs
instead of names?  Should I discuss this issue
on python-dev instead of here?

BTW, please add a "Test" category to the
available choices for Bugs.

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

>Comment By: Martin v. Löwis (loewis)
Date: 2002-09-02 16:14

Message:
Logged In: YES 
user_id=21627

This patch won't work in other locales. E.g. in de_DE, a
date might read

Mär 21 01:14

which won't match your regexp. Furthermore, recent GNU
fileutils format it as

2002-09-02 10:12

in non-C locales, which is even further away.

In theory, putting LC_ALL=C into the environment should
solve this, but it would be better to not rely on the date
formatting. Why do you have to put an explicit format string
for the date in there? What specific change made the
expression "pickier"? 


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

Comment By: Jason Tishler (jlt63)
Date: 2002-08-27 20:12

Message:
Logged In: YES 
user_id=86216

Attached is a patch to fix this problem.  As
suggested by Guido, I am proposing a "better"
regular expression.

Unfortunately, I had to make an assumption on the
date format in order to match the user and group
names regardless of the number of embedded spaces.
Is my date regular expression acceptable?  Will it
work in non US locales?

FWIW, I tested under Cygwin and Red Hat Linux 7.1
without any ill effects.


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

Comment By: Neal Norwitz (nnorwitz)
Date: 2002-08-11 17:48

Message:
Logged In: YES 
user_id=33168

Jason, I presume this is still a problem.  It probably would
be a good idea to discuss on python-dev.

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

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