Note the re.VERBOSE flag allows this whitespace treatment of the pattern.
2011/11/29 Toshiyuki Ogura <m...@live.jp>: > Hi. > > I found a problem with Python 2.5.6. > test_commands fails when 'make test'. > bugs.python.org doesn't seem to have an option for Python 2.5 in "Versions:" > drop-down menu when creating an issue. > The problem seems to be the same as #11946. > http://bugs.python.org/issue11946 > I also made a patch for 2.5.6. > > --- Python-2.5.6/Lib/test/test_commands.py.orig 2006-06-29 > 04:10:08.000000000 +0000 > +++ Python-2.5.6/Lib/test/test_commands.py 2011-11-29 08:46:29.602607019 > +0000 > @@ -46,11 +46,7 @@ > # drwxr-xr-x 15 Joe User My Group 4096 Aug 12 12:50 / > # Note that the first case above has a space in the group name > # while the second one has a space in both names. > - pat = r'''d......... # It is a directory. > - \+? # It may have ACLs. > - \s+\d+ # It has some number of links. > - [^/]* # Skip user, group, size, and date. > - /\. # and end with the name of the file. > + pat = r'''^.*(\/\.)[\ ]*[\n\r]*$ > &nbs p; ''' > > self.assert_(re.match(pat, getstatus("/."), re.VERBOSE)) > > > Can I submit the issue at bugs.python.org? > I think many people are still using Python 2.5 because of Google App Engine > and fixing bugs with 2.5 is still helpful. > > Toshiyuki Ogura > > > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://mail.python.org/mailman/listinfo/python-list