summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-04 00:18:49 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-04 00:18:49 (GMT)
commit577ba7d43a59dd2d893c4ccf95e7d4e21cc84ac5 (patch)
tree7655179e926d87e766d6e215b2b59e70b4d6c5e0
parentc4e69cc1d84a8e025c6b1894b4749cda8bb1d156 (diff)
downloadcpython-577ba7d43a59dd2d893c4ccf95e7d4e21cc84ac5.zip
cpython-577ba7d43a59dd2d893c4ccf95e7d4e21cc84ac5.tar.gz
cpython-577ba7d43a59dd2d893c4ccf95e7d4e21cc84ac5.tar.bz2
That test was never run (since thread has been renamed to _thread in 3.x)
-rw-r--r--Lib/test/test_threading_local.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/Lib/test/test_threading_local.py b/Lib/test/test_threading_local.py
index 42d745e..391bf00 100644
--- a/Lib/test/test_threading_local.py
+++ b/Lib/test/test_threading_local.py
@@ -137,20 +137,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)