mirror of
https://github.com/python/cpython.git
synced 2025-07-25 20:24:11 +00:00

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.
17 lines
384 B
Python
Executable file
17 lines
384 B
Python
Executable file
from test import test_support
|
|
import unittest
|
|
|
|
crypt = test_support.import_module('crypt')
|
|
|
|
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()
|