MCPcopy Create free account
hub / github.com/python/cpython / test_add_nonascii_string_header_raises

Method test_add_nonascii_string_header_raises

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

Source from the content-addressed store, hash-verified

111 'YWwuIE3hciByZW5kZWx06Ww/?=\n\n')
112
113 def test_add_nonascii_string_header_raises(self):
114 with self.assertRaisesRegex(ValueError, "ASCII-only"):
115 self._box.add(self._nonascii_msg)
116 self._box.flush()
117 self.assertEqual(len(self._box), 0)
118 self.assertMailboxEmpty()
119
120 def test_add_that_raises_leaves_mailbox_empty(self):
121 class CustomError(Exception): ...

Callers

nothing calls this directly

Calls 5

assertRaisesRegexMethod · 0.80
addMethod · 0.45
flushMethod · 0.45
assertEqualMethod · 0.45
assertMailboxEmptyMethod · 0.45

Tested by

no test coverage detected