MCPcopy Index your code
hub / github.com/python/cpython / test_eof

Method test_eof

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

Source from the content-addressed store, hash-verified

1960 self.assertEqual(bio.read(1), b'')
1961
1962 def test_eof(self):
1963 bio = ssl.MemoryBIO()
1964 self.assertFalse(bio.eof)
1965 self.assertEqual(bio.read(), b'')
1966 self.assertFalse(bio.eof)
1967 bio.write(b'foo')
1968 self.assertFalse(bio.eof)
1969 bio.write_eof()
1970 self.assertFalse(bio.eof)
1971 self.assertEqual(bio.read(2), b'fo')
1972 self.assertFalse(bio.eof)
1973 self.assertEqual(bio.read(1), b'o')
1974 self.assertTrue(bio.eof)
1975 self.assertEqual(bio.read(), b'')
1976 self.assertTrue(bio.eof)
1977
1978 def test_pending(self):
1979 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