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

Method test_add_text_file_warns

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

Source from the content-addressed store, hash-verified

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:
173 f.write(_sample_message)
174 f.seek(0)
175 with self.assertWarns(DeprecationWarning):
176 key = self._box.add(f)
177 self.assertEqual(self._box.get_bytes(key).split(b'\n'),
178 _bytes_sample_message.split(b'\n'))
179
180 def test_add_StringIO_warns(self):
181 with self.assertWarns(DeprecationWarning):

Callers

nothing calls this directly

Calls 7

assertWarnsMethod · 0.80
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