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

Method test_add_binary_file

Lib/test/test_mailbox.py:156–162  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

154 "Да, они летят.\n")
155
156 def test_add_binary_file(self):
157 with tempfile.TemporaryFile('wb+') as f:
158 f.write(_bytes_sample_message)
159 f.seek(0)
160 key = self._box.add(f)
161 self.assertEqual(self._box.get_bytes(key).split(b'\n'),
162 _bytes_sample_message.split(b'\n'))
163
164 def test_add_binary_nonascii_file(self):
165 with tempfile.TemporaryFile('wb+') as f:

Callers

nothing calls this directly

Calls 6

writeMethod · 0.45
seekMethod · 0.45
addMethod · 0.45
assertEqualMethod · 0.45
splitMethod · 0.45
get_bytesMethod · 0.45

Tested by

no test coverage detected