Mercurial > cpython-lru_cache-weakref
annotate Lib/test/test_crypt.py @ 58925:eecf1bef052d 2.6
Merged revisions 78207 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line
#7930: fix stripid
........
| author | Ezio Melotti <ezio.melotti@gmail.com> |
|---|---|
| date | Tue, 16 Feb 2010 23:29:44 +0000 |
| parents | 49dc9af90b3d |
| children | f2c90fd05d66 |
| rev | line source |
|---|---|
|
45751
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
1 from test import test_support |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
2 import unittest |
|
4642
4359e8d389e6
new test script for cryptmodule.py
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
diff
changeset
|
3 import crypt |
|
4811
9ae3cccfa7cd
Many scripts, but small changes. Update the way the scripts obtain the
Roger E. Masse <rmasse@newcnri.cnri.reston.va.us>
parents:
4742
diff
changeset
|
4 |
|
45751
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
5 class CryptTestCase(unittest.TestCase): |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
6 |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
7 def test_crypt(self): |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
8 c = crypt.crypt('mypassword', 'ab') |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
9 if test_support.verbose: |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
10 print 'Test encryption: ', c |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
11 |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
12 def test_main(): |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
13 test_support.run_unittest(CryptTestCase) |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
14 |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
15 if __name__ == "__main__": |
|
49dc9af90b3d
Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents:
41399
diff
changeset
|
16 test_main() |
