summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_crypt.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2011-02-22 20:17:14 (GMT)
committerBrett Cannon <bcannon@gmail.com>2011-02-22 20:17:14 (GMT)
commit292ee5dc4398a52ac5fbb2b46eaf888e4fa0a2bb (patch)
treeaef8ebffa86cddc97814483f27c4ebc5c6019705 /Lib/test/test_crypt.py
parentb94767ff44edf5d461d7cb1c8eb5160f83886358 (diff)
downloadcpython-292ee5dc4398a52ac5fbb2b46eaf888e4fa0a2bb.zip
cpython-292ee5dc4398a52ac5fbb2b46eaf888e4fa0a2bb.tar.gz
cpython-292ee5dc4398a52ac5fbb2b46eaf888e4fa0a2bb.tar.bz2
Fix test.test_crypt.test_methods() to pass on OS X.
Diffstat (limited to 'Lib/test/test_crypt.py')
-rw-r--r--Lib/test/test_crypt.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_crypt.py b/Lib/test/test_crypt.py
index cb4234b..306296f 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)