#NEWLINE# def test_main( ) : #NEWLINE# #INDENT# suite = unittest . TestSuite ( ) #NEWLINE# suite . addTest ( DocTestSuite ( '_threading_local' ) ) #NEWLINE# if test_support . is_jython : #NEWLINE# #INDENT# del ThreadingLocalTest . test_local_refs #NEWLINE# #UNINDENT# suite . addTest ( unittest . makeSuite ( ThreadingLocalTest ) ) #NEWLINE# try : #NEWLINE# #INDENT# from thread import _local #NEWLINE# #UNINDENT# except ImportError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# import _threading_local #NEWLINE# local_orig = _threading_local . local #NEWLINE# def setUp( test ) : #NEWLINE# #INDENT# _threading_local . local = _local #NEWLINE# #UNINDENT# def tearDown( test ) : #NEWLINE# #INDENT# _threading_local . local = local_orig #NEWLINE# #UNINDENT# suite . addTest ( DocTestSuite ( '_threading_local' , setUp = tearDown , tearDown = tearDown ) ) #NEWLINE# #UNINDENT# test_support . run_unittest ( suite )