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

Method test_add_binary_nonascii_file

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

Source from the content-addressed store, hash-verified

161 _bytes_sample_message.split(b'\n'))
162
163 def test_add_binary_nonascii_file(self):
164 with tempfile.TemporaryFile('wb+') as f:
165 f.write(self._non_latin_bin_msg)
166 f.seek(0)
167 key = self._box.add(f)
168 self.assertEqual(self._box.get_bytes(key).split(b'\n'),
169 self._non_latin_bin_msg.split(b'\n'))
170
171 def test_add_text_file_warns(self):
172 with tempfile.TemporaryFile('w+', encoding='utf-8') 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