PyXR

c:\python24\lib \ test \ test_threading_local.py



0001 import unittest
0002 from doctest import DocTestSuite
0003 from test import test_support
0004 
0005 def test_main():
0006     suite = DocTestSuite('_threading_local')
0007 
0008     try:
0009         from thread import _local
0010     except ImportError:
0011         pass
0012     else:
0013         import _threading_local
0014         local_orig = _threading_local.local
0015         def setUp(test):
0016             _threading_local.local = _local
0017         def tearDown(test):
0018             _threading_local.local = local_orig
0019         suite.addTest(DocTestSuite('_threading_local',
0020                                    setUp=setUp, tearDown=tearDown)
0021                       )
0022 
0023     test_support.run_suite(suite)
0024 
0025 if __name__ == '__main__':
0026     test_main()
0027 

Generated by PyXR 0.9.4
SourceForge.net Logo