def go(): connection = yield From(self.graph.connect()) # build connection connection.close() stream = Stream(connection, None, "processor", None, None, "stephen", "password", False, False, Future) with self.assertRaises(RuntimeError): msg = yield From(stream.read())
def test_null_read_on_closed(self): connection = yield self.graph.connect() # build connection connection.close() stream = Stream(connection, None, "processor", None, None, "stephen", "password", False, False, Future) with self.assertRaises(RuntimeError): msg = yield stream.read()
async def go(): connection = await self.graph.connect() # build connection await connection.close() stream = Stream(connection, None, "processor", None, self.loop, "stephen", "password", False, False, asyncio.Future) with self.assertRaises(RuntimeError): msg = await stream.read()