Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 292ee5d

Browse files
committed
Fix test.test_crypt.test_methods() to pass on OS X.
1 parent b94767f commit 292ee5d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_crypt.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ def test_saltedcrypt(self):
2525
self.assertEqual(len(pw), method.total_size)
2626

2727
def test_methods(self):
28-
self.assertTrue(len(crypt.methods()) > 1)
28+
# Gurantee that METHOD_CRYPT is the last method in crypt.methods().
29+
methods = crypt.methods()
30+
self.assertTrue(len(methods) >= 1)
31+
self.assertEqual(crypt.METHOD_CRYPT, methods[-1])
2932

3033
def test_main():
3134
support.run_unittest(CryptTestCase)

0 commit comments

Comments
 (0)