(self)
| 248 | assert not pending_res.successful() |
| 249 | |
| 250 | def test_raising(self): |
| 251 | notb = self.app.AsyncResult(self.task3['id']) |
| 252 | withtb = self.app.AsyncResult(self.task5['id']) |
| 253 | |
| 254 | with pytest.raises(KeyError): |
| 255 | notb.get() |
| 256 | with pytest.raises(KeyError) as excinfo: |
| 257 | withtb.get() |
| 258 | |
| 259 | tb = [t.strip() for t in traceback.format_tb(excinfo.tb)] |
| 260 | assert 'File "foo.py", line 2, in foofunc' not in tb |
| 261 | assert 'File "bar.py", line 3, in barfunc' not in tb |
| 262 | assert excinfo.value.args[0] == 'blue' |
| 263 | assert excinfo.typename == 'KeyError' |
| 264 | |
| 265 | def test_raising_remote_tracebacks(self): |
| 266 | pytest.importorskip('tblib') |
nothing calls this directly
no test coverage detected