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

Method test_detach_flush

Lib/test/test_io.py:1896–1902  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1894 self.assertEqual(bufio.write(b''), 0)
1895
1896 def test_detach_flush(self):
1897 raw = self.MockRawIO()
1898 buf = self.tp(raw)
1899 buf.write(b"howdy!")
1900 self.assertFalse(raw._write_stack)
1901 buf.detach()
1902 self.assertEqual(raw._write_stack, [b"howdy!"])
1903
1904 def test_write(self):
1905 # Write to the buffered IO but don't overflow the buffer.

Callers

nothing calls this directly

Calls 4

assertFalseMethod · 0.80
writeMethod · 0.45
detachMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected