diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-08-04 00:19:35 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-08-04 00:19:35 (GMT) |
commit | 9b3383ca65fc0181e3b7a6aacae3539de545591f (patch) | |
tree | 6d2bba753c945a80c29e749847efd8d37c797735 | |
parent | e06528c64b62abbaa49dedc395e1ce58ad3962fe (diff) | |
download | cpython-9b3383ca65fc0181e3b7a6aacae3539de545591f.zip cpython-9b3383ca65fc0181e3b7a6aacae3539de545591f.tar.gz cpython-9b3383ca65fc0181e3b7a6aacae3539de545591f.tar.bz2 |
Merged revisions 83696 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83696 | antoine.pitrou | 2010-08-04 02:18:49 +0200 (mer., 04 août 2010) | 3 lines
That test was never run (since thread has been renamed to _thread in 3.x)
........
-rw-r--r-- | Lib/test/test_threading_local.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Lib/test/test_threading_local.py b/Lib/test/test_threading_local.py index 2b896ff..84523ad 100644 --- a/Lib/test/test_threading_local.py +++ b/Lib/test/test_threading_local.py @@ -126,20 +126,14 @@ def test_main(): suite.addTest(unittest.makeSuite(ThreadLocalTest)) suite.addTest(unittest.makeSuite(PyThreadingLocalTest)) - try: - from thread import _local - except ImportError: - pass - else: - import _threading_local - local_orig = _threading_local.local - def setUp(test): - _threading_local.local = _local - def tearDown(test): - _threading_local.local = local_orig - suite.addTest(DocTestSuite('_threading_local', - setUp=setUp, tearDown=tearDown) - ) + local_orig = _threading_local.local + def setUp(test): + _threading_local.local = _thread._local + def tearDown(test): + _threading_local.local = local_orig + suite.addTest(DocTestSuite('_threading_local', + setUp=setUp, tearDown=tearDown) + ) support.run_unittest(suite) |