diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-11 05:20:01 +0200 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-11 05:20:01 +0200 |
commit | 45d5de15008d53e4dd1018303f3e9ad56e43934f (patch) | |
tree | b8dd21d66192eb6af3098d364df8339dd84ab70d | |
parent | edb0e5eb2c012f02ab3d7dbb968e7647b581a9ca (diff) | |
parent | 90bbbd11648e8d64013369a595b982788fa89819 (diff) | |
download | cpython-git-45d5de15008d53e4dd1018303f3e9ad56e43934f.tar.gz |
#16919: merge with 3.3.
-rw-r--r-- | Lib/test/test_crypt.py | 11 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/Lib/test/test_crypt.py b/Lib/test/test_crypt.py index dc107d8970..cfb7341e20 100644 --- a/Lib/test/test_crypt.py +++ b/Lib/test/test_crypt.py @@ -1,7 +1,11 @@ from test import support import unittest -crypt = support.import_module('crypt') +def setUpModule(): + # this import will raise unittest.SkipTest if _crypt doesn't exist, + # so it has to be done in setUpModule for test discovery to work + global crypt + crypt = support.import_module('crypt') class CryptTestCase(unittest.TestCase): @@ -29,8 +33,5 @@ class CryptTestCase(unittest.TestCase): self.assertTrue(len(crypt.methods) >= 1) self.assertEqual(crypt.METHOD_CRYPT, crypt.methods[-1]) -def test_main(): - support.run_unittest(CryptTestCase) - if __name__ == "__main__": - test_main() + unittest.main() @@ -620,6 +620,9 @@ Tests - Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host. +- Issue #16919: test_crypt now works with unittest test discovery. + Patch by Zachary Ware. + - Issue #16910: test_bytes, test_unicode, and test_userstring now work with unittest test discovery. Patch by Zachary Ware. |