From: Brett Cannon Date: Tue, 22 Feb 2011 20:17:14 +0000 (+0000) Subject: Fix test.test_crypt.test_methods() to pass on OS X. X-Git-Tag: v3.3.0a1~3117 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=292ee5dc4398a52ac5fbb2b46eaf888e4fa0a2bb;p=python Fix test.test_crypt.test_methods() to pass on OS X. --- diff --git a/Lib/test/test_crypt.py b/Lib/test/test_crypt.py index cb4234b5e5..306296fe84 100644 --- a/Lib/test/test_crypt.py +++ b/Lib/test/test_crypt.py @@ -25,7 +25,10 @@ class CryptTestCase(unittest.TestCase): self.assertEqual(len(pw), method.total_size) def test_methods(self): - self.assertTrue(len(crypt.methods()) > 1) + # Gurantee that METHOD_CRYPT is the last method in crypt.methods(). + methods = crypt.methods() + self.assertTrue(len(methods) >= 1) + self.assertEqual(crypt.METHOD_CRYPT, methods[-1]) def test_main(): support.run_unittest(CryptTestCase)