Pages

2012-01-03

Patch for test_commands.py in Python 2.5.6

Something seems to be wrong with a test script in Python 2.5.6.

Environment:

  • CentOS 6.2 x86_64 on VMware
  • Python 2.5.6

Symptom:

  • make test fails.

Solution:

  • Apply the patch available here on this issue or the following (patch on my Google Docs) to Lib/test/test_commands.py.


--- Lib/test/test_commands.py.orig 2006-06-29 04:10:08.000000000 +0000
+++ Lib/test/test_commands.py 2012-01-02 11:19:28.535171924 +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]*$
                '''
 
         self.assert_(re.match(pat, getstatus("/."), re.VERBOSE))


No comments: