#NEWLINE# def test_error( self ) : #NEWLINE# #INDENT# '\n        Exception raised running unit test is reported as an error\n        ' #NEWLINE# os . chdir ( self . tmpdir ) #NEWLINE# sub_tmpdir = tempfile . mkdtemp ( dir = self . tmpdir ) #NEWLINE# basename = os . path . basename ( sub_tmpdir ) #NEWLINE# fh = open ( os . path . join ( basename , '__init__.py' ) , 'w' ) #NEWLINE# fh . write ( '\n' ) #NEWLINE# fh . close ( ) #NEWLINE# fh = open ( os . path . join ( basename , 'test_pool_runner_dotted_fail.py' ) , 'w' ) #NEWLINE# fh . write ( dedent ( '\n            import unittest\n            class A(unittest.TestCase):\n                def testError(self):\n                    raise AttributeError\n            ' ) ) #NEWLINE# fh . close ( ) #NEWLINE# module_name = ( basename + '.test_pool_runner_dotted_fail.A.testError' ) #NEWLINE# result = Queue ( ) #NEWLINE# poolRunner ( module_name , result ) #NEWLINE# result . get ( ) #NEWLINE# self . assertEqual ( len ( result . get ( ) . errors ) , 1 )