Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / src / nas,5.n2.os.2 / lib / python / lib / python2.4 / test / test_threading_local.py
CommitLineData
86530b38
AT
1import unittest
2from doctest import DocTestSuite
3from test import test_support
4
5def test_main():
6 suite = DocTestSuite('_threading_local')
7
8 try:
9 from thread import _local
10 except ImportError:
11 pass
12 else:
13 import _threading_local
14 local_orig = _threading_local.local
15 def setUp(test):
16 _threading_local.local = _local
17 def tearDown(test):
18 _threading_local.local = local_orig
19 suite.addTest(DocTestSuite('_threading_local',
20 setUp=setUp, tearDown=tearDown)
21 )
22
23 test_support.run_suite(suite)
24
25if __name__ == '__main__':
26 test_main()