(self)
| 337 | c.loop(*c.loop_args()) |
| 338 | |
| 339 | def test_loop_when_socket_error(self): |
| 340 | |
| 341 | class Connection(self.app.connection_for_read().__class__): |
| 342 | obj = None |
| 343 | |
| 344 | def drain_events(self, **kwargs): |
| 345 | self.obj.connection = None |
| 346 | raise OSError('foo') |
| 347 | |
| 348 | c = self.LoopConsumer() |
| 349 | c.blueprint.state = RUN |
| 350 | conn = c.connection = Connection(self.app.conf.broker_url) |
| 351 | c.connection.obj = c |
| 352 | c.qos = QoS(c.task_consumer.qos, 10) |
| 353 | with pytest.raises(socket.error): |
| 354 | c.loop(*c.loop_args()) |
| 355 | |
| 356 | c.blueprint.state = CLOSE |
| 357 | c.connection = conn |
| 358 | c.loop(*c.loop_args()) |
| 359 | |
| 360 | def test_loop(self): |
| 361 |
nothing calls this directly
no test coverage detected