diff options
| author | Brett Cannon <bcannon@gmail.com> | 2008-03-13 20:47:41 (GMT) |
|---|---|---|
| committer | Brett Cannon <bcannon@gmail.com> | 2008-03-13 20:47:41 (GMT) |
| commit | 2e0f9f3dd953390472fa947dac0335629463f78b (patch) | |
| tree | 34923e014a5d74ed45fbedec1bb8ac428c23697e /Lib/test/test_crypt.py | |
| parent | b8d37359cd054bd80465bd5be01a119c609664ae (diff) | |
| download | cpython-2e0f9f3dd953390472fa947dac0335629463f78b.zip cpython-2e0f9f3dd953390472fa947dac0335629463f78b.tar.gz cpython-2e0f9f3dd953390472fa947dac0335629463f78b.tar.bz2 | |
Convert test_contains, test_crypt, and test_select to unittest.
Patch from GHOP 294 by David Marek.
Diffstat (limited to 'Lib/test/test_crypt.py')
| -rwxr-xr-x | Lib/test/test_crypt.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/Lib/test/test_crypt.py b/Lib/test/test_crypt.py index c69dba8..f6f3a81 100755 --- a/Lib/test/test_crypt.py +++ b/Lib/test/test_crypt.py @@ -1,11 +1,16 @@ -#! /usr/bin/env python -"""Simple test script for cryptmodule.c - Roger E. Masse -""" - -from test.test_support import verbose +from test import test_support +import unittest import crypt -c = crypt.crypt('mypassword', 'ab') -if verbose: - print 'Test encryption: ', c +class CryptTestCase(unittest.TestCase): + + def test_crypt(self): + c = crypt.crypt('mypassword', 'ab') + if test_support.verbose: + print 'Test encryption: ', c + +def test_main(): + test_support.run_unittest(CryptTestCase) + +if __name__ == "__main__": + test_main() |
