def test_setting_result_fails(self):
        from furious.async import Async
        from furious.errors import NotExecutingError

        job = Async(target=dir)

        def set_result():
            job.result = 123

        self.assertRaises(NotExecutingError, set_result)
        self.assertFalse(job.executed)
Ensure the result can not be set without the execute flag set.
dataset/ETHPy150Open Workiva/furious/furious/tests/test_async.py/TestAsync.test_setting_result_fails