annotate Lib/test/test_crypt.py @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents f2c90fd05d66
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
52456
f2c90fd05d66 Add import_function method to test.test_support, and modify a number of
R. David Murray <rdmurray@bitdance.com>
parents: 45751
diff changeset
3
f2c90fd05d66 Add import_function method to test.test_support, and modify a number of
R. David Murray <rdmurray@bitdance.com>
parents: 45751
diff changeset
4 crypt = test_support.import_module('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
5
45751
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
6 class CryptTestCase(unittest.TestCase):
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
7
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
8 def test_crypt(self):
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
9 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
10 if test_support.verbose:
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
11 print 'Test encryption: ', c
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
12
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
13 def test_main():
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
14 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
15
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
16 if __name__ == "__main__":
49dc9af90b3d Convert test_contains, test_crypt, and test_select to unittest.
Brett Cannon <bcannon@gmail.com>
parents: 41399
diff changeset
17 test_main()