def test_wait_with_error_and_raise_exc(self): async_result = AsyncResult(client=None) async_result.error = True async_result.error_info = 'some_error' async_result._ready.set() with pytest.raises(RuntimeError): async_result.wait(timeout=0.1, raise_exc=True)
def test_wait_with_error_and_raise_exc(self): ar = AsyncResult(client=None) ar.error = True ar.error_info = 'some_error' try: ar.wait(timeout=0.1, raise_exc=True) raised = False except RuntimeError: raised = True assert raised is True
def test_wait_with_error_and_without_raise_exc(self): ar = AsyncResult(client=None) ar.error = True ar.error_info = 'some_error' ar.wait(timeout=0.01)
def test_wait_with_error_and_without_raise_exc(self): async_result = AsyncResult(client=None) async_result.error = True async_result.error_info = 'some_error' async_result._ready.set() async_result.wait(timeout=0.01)