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

Method test_ctrl_z

Lib/test/test_winconsoleio.py:234–241  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

232
233 @requires_resource('console')
234 def test_ctrl_z(self):
235 with open('CONIN$', 'rb', buffering=0) as stdin:
236 source = '\xC4\x1A\r\n'.encode('utf-16-le')
237 expected = '\xC4'.encode('utf-8')
238 write_input(stdin, source)
239 a, b = stdin.read(1), stdin.readall()
240 self.assertEqual(expected[0:1], a)
241 self.assertEqual(expected[1:], b)
242
243if __name__ == "__main__":
244 unittest.main()

Callers

nothing calls this directly

Calls 5

openFunction · 0.50
encodeMethod · 0.45
readMethod · 0.45
readallMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected