MCPcopy
hub / github.com/tornadoweb/tornado / test_write_memoryview

Method test_write_memoryview

tornado/test/iostream_test.py:411–420  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

409
410 @gen_test
411 def test_write_memoryview(self):
412 rs, ws = yield self.make_iostream_pair()
413 try:
414 fut = rs.read_bytes(4)
415 ws.write(memoryview(b"hello"))
416 data = yield fut
417 self.assertEqual(data, b"hell")
418 finally:
419 ws.close()
420 rs.close()
421
422 @gen_test
423 def test_read_bytes_partial(self):

Callers

nothing calls this directly

Calls 4

make_iostream_pairMethod · 0.95
read_bytesMethod · 0.80
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected