We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef346a2 commit 04c0a40Copy full SHA for 04c0a40
Lib/test/test_crypt.py
@@ -1,14 +1,20 @@
1
+import sys
2
from test import test_support
3
import unittest
4
5
crypt = test_support.import_module('crypt')
6
7
+if sys.platform.startswith('openbsd'):
8
+ raise unittest.SkipTest('The only supported method on OpenBSD is Blowfish')
9
+
10
class CryptTestCase(unittest.TestCase):
11
12
def test_crypt(self):
- c = crypt.crypt('mypassword', 'ab')
- if test_support.verbose:
- print 'Test encryption: ', c
13
+ cr = crypt.crypt('mypassword', 'ab')
14
+ if cr is not None:
15
+ cr2 = crypt.crypt('mypassword', cr)
16
+ self.assertEqual(cr2, cr)
17
18
19
def test_main():
20
test_support.run_unittest(CryptTestCase)
0 commit comments