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

Method test_add_StringIO_warns

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

Source from the content-addressed store, hash-verified

179 _bytes_sample_message.split(b'\n'))
180
181 def test_add_StringIO_warns(self):
182 with self.assertWarns(DeprecationWarning):
183 key = self._box.add(io.StringIO(self._template % "0"))
184 self.assertEqual(self._box.get_string(key), self._template % "0")
185
186 def test_add_nonascii_StringIO_raises(self):
187 with self.assertWarns(DeprecationWarning):

Callers

nothing calls this directly

Calls 4

assertWarnsMethod · 0.80
addMethod · 0.45
assertEqualMethod · 0.45
get_stringMethod · 0.45

Tested by

no test coverage detected