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

Method test_explain_to

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

Source from the content-addressed store, hash-verified

1610 self._check_sample(msg)
1611
1612 def test_explain_to(self):
1613 # Copy self's format-specific data to other message formats.
1614 # This test is superficial; better ones are in TestMessageConversion.
1615 msg = self._factory()
1616 for class_ in self.all_mailbox_types:
1617 other_msg = class_()
1618 msg._explain_to(other_msg)
1619 other_msg = email.message.Message()
1620 self.assertRaises(TypeError, lambda: msg._explain_to(other_msg))
1621
1622 def _post_initialize_hook(self, msg):
1623 # 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