def test_get_raises(self, exc_info): result = WaitResult() result.send(1, exc_info) with pytest.raises(self.CustomError): result.get()
def test_has_exception(self, exc_info): result = WaitResult() assert result.has_result is False result.send(None, exc_info) assert result.has_result is True
def test_get_result_multiple_times(self): result = WaitResult() result.send(1, None) assert result.get() == 1 assert result.get() == 1
def test_has_result(self): result = WaitResult() assert result.has_result is False result.send("ok", None) assert result.has_result is True