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

Method test_explain_to

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

Source from the content-addressed store, hash-verified

1625 self._check_sample(msg)
1626
1627 def test_explain_to(self):
1628 # Copy self's format-specific data to other message formats.
1629 # This test is superficial; better ones are in TestMessageConversion.
1630 msg = self._factory()
1631 for class_ in self.all_mailbox_types:
1632 other_msg = class_()
1633 msg._explain_to(other_msg)
1634 other_msg = email.message.Message()
1635 self.assertRaises(TypeError, lambda: msg._explain_to(other_msg))
1636
1637 def _post_initialize_hook(self, msg):
1638 # Overridden by subclasses to check extra things after initialization

Callers

nothing calls this directly

Calls 3

_factoryMethod · 0.80
_explain_toMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected