Logo
Explore Help
Sign In
ada/cpython
0
0
Fork 0
You've already forked cpython
mirror of https://github.com/AdaCore/cpython.git synced 2026-02-12 12:57:15 -08:00
Code Issues Packages Projects Releases Wiki Activity
Files
d988f429fe43808345812ef63dfa8da170c61871
cpython/Lib/test/test_crypt.py

18 lines
384 B
Python
Raw Normal View History

Convert test_contains, test_crypt, and test_select to unittest. Patch from GHOP 294 by David Marek.
2008-03-13 20:47:41 +00:00
from test import test_support
import unittest
Add import_function method to test.test_support, and modify a number of tests that expect to be skipped if imports fail or functions don't exist to use import_function and import_module. The ultimate goal is to change regrtest to not skip automatically on ImportError. Checking in now to make sure the buldbots don't show any errors on platforms I can't direct test on.
2009-03-30 19:04:00 +00:00
crypt = test_support.import_module('crypt')
Many scripts, but small changes. Update the way the scripts obtain the 'verbose' flag ala GvR updated test harness architecture. Old way: verbose = 0 if __name__ == '__main__': verbose = 1 New way: from test_support import verbose Some other small readablility and functionality updates.
1996-12-20 22:36:52 +00:00
Convert test_contains, test_crypt, and test_select to unittest. Patch from GHOP 294 by David Marek.
2008-03-13 20:47:41 +00:00
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()
Reference in New Issue Copy Permalink
Powered by Gitea Page: 3238ms Template: 13ms
English
English
Licenses API