[Python-checkins] r46259 - python/trunk/Lib/test/test_grp.py

brett.cannon python-checkins at python.org
Thu May 25 23:33:12 CEST 2006


Author: brett.cannon
Date: Thu May 25 23:33:11 2006
New Revision: 46259

Modified:
   python/trunk/Lib/test/test_grp.py
Log:
Change test_values so that it compares the lowercasing of group names since getgrall() can return all lowercase names while getgrgid() returns proper casing.

Discovered on Ubuntu 5.04 (custom).


Modified: python/trunk/Lib/test/test_grp.py
==============================================================================
--- python/trunk/Lib/test/test_grp.py	(original)
+++ python/trunk/Lib/test/test_grp.py	Thu May 25 23:33:11 2006
@@ -31,7 +31,10 @@
             self.assertEqual(e2.gr_gid, e.gr_gid)
             e2 = grp.getgrnam(e.gr_name)
             self.check_value(e2)
-            self.assertEqual(e2.gr_name, e.gr_name)
+            # There are instances where getgrall() returns group names in
+            # lowercase while getgrgid() returns proper casing.
+            # Discovered on Ubuntu 5.04 (custom).
+            self.assertEqual(e2.gr_name.lower(), e.gr_name.lower())
 
     def test_errors(self):
         self.assertRaises(TypeError, grp.getgrgid)


More information about the Python-checkins mailing list