예제 #1
0
 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()
예제 #2
0
 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())
예제 #3
0
 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()