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