mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Convert test_contains, test_crypt, and test_select to unittest.
Patch from GHOP 294 by David Marek.
This commit is contained in:
parent
b8d37359cd
commit
2e0f9f3dd9
4 changed files with 60 additions and 69 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue