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

Method test_readall

Lib/test/test_file_eintr.py:171–183  ·  view source on GitHub ↗

readall() must handle signals and not lose data.

(self)

Source from the content-addressed store, hash-verified

169 expected=[b'hello\n', b'world!\n']))
170
171 def test_readall(self):
172 """readall() must handle signals and not lose data."""
173 self._test_reading(
174 data_to_write=b'hello\nworld!',
175 read_and_verify_code=self._READING_CODE_TEMPLATE.format(
176 read_method_name='readall',
177 expected=b'hello\nworld!\n'))
178 # read() is the same thing as readall().
179 self._test_reading(
180 data_to_write=b'hello\nworld!',
181 read_and_verify_code=self._READING_CODE_TEMPLATE.format(
182 read_method_name='read',
183 expected=b'hello\nworld!\n'))
184
185
186class CTestFileIOSignalInterrupt(TestFileIOSignalInterrupt, unittest.TestCase):

Callers

nothing calls this directly

Calls 2

_test_readingMethod · 0.95
formatMethod · 0.45

Tested by

no test coverage detected