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

Method test_eof

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

Source from the content-addressed store, hash-verified

1743 self.assertEqual(bio.read(1), b'')
1744
1745 def test_eof(self):
1746 bio = ssl.MemoryBIO()
1747 self.assertFalse(bio.eof)
1748 self.assertEqual(bio.read(), b'')
1749 self.assertFalse(bio.eof)
1750 bio.write(b'foo')
1751 self.assertFalse(bio.eof)
1752 bio.write_eof()
1753 self.assertFalse(bio.eof)
1754 self.assertEqual(bio.read(2), b'fo')
1755 self.assertFalse(bio.eof)
1756 self.assertEqual(bio.read(1), b'o')
1757 self.assertTrue(bio.eof)
1758 self.assertEqual(bio.read(), b'')
1759 self.assertTrue(bio.eof)
1760
1761 def test_pending(self):
1762 bio = ssl.MemoryBIO()

Callers

nothing calls this directly

Calls 6

assertFalseMethod · 0.80
assertTrueMethod · 0.80
assertEqualMethod · 0.45
readMethod · 0.45
writeMethod · 0.45
write_eofMethod · 0.45

Tested by

no test coverage detected