MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_read_write

Method test_read_write

Lib/test/test_ssl.py:1731–1743  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1729class MemoryBIOTests(unittest.TestCase):
1730
1731 def test_read_write(self):
1732 bio = ssl.MemoryBIO()
1733 bio.write(b'foo')
1734 self.assertEqual(bio.read(), b'foo')
1735 self.assertEqual(bio.read(), b'')
1736 bio.write(b'foo')
1737 bio.write(b'bar')
1738 self.assertEqual(bio.read(), b'foobar')
1739 self.assertEqual(bio.read(), b'')
1740 bio.write(b'baz')
1741 self.assertEqual(bio.read(2), b'ba')
1742 self.assertEqual(bio.read(1), b'z')
1743 self.assertEqual(bio.read(1), b'')
1744
1745 def test_eof(self):
1746 bio = ssl.MemoryBIO()

Callers

nothing calls this directly

Calls 3

writeMethod · 0.45
assertEqualMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected