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

Method test_info_and_flags

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

Source from the content-addressed store, hash-verified

1680 self._check_sample(msg)
1681
1682 def test_info_and_flags(self):
1683 # Test interaction of info and flag methods
1684 msg = mailbox.MaildirMessage(_sample_message)
1685 self.assertEqual(msg.get_info(), '')
1686 msg.set_flags('SF')
1687 self.assertEqual(msg.get_flags(), 'FS')
1688 self.assertEqual(msg.get_info(), '2,FS')
1689 msg.set_info('1,')
1690 self.assertEqual(msg.get_flags(), '')
1691 self.assertEqual(msg.get_info(), '1,')
1692 msg.remove_flag('RPT')
1693 self.assertEqual(msg.get_flags(), '')
1694 self.assertEqual(msg.get_info(), '1,')
1695 msg.add_flag('D')
1696 self.assertEqual(msg.get_flags(), 'D')
1697 self.assertEqual(msg.get_info(), '2,D')
1698 self._check_sample(msg)
1699
1700
1701class _TestMboxMMDFMessage:

Callers

nothing calls this directly

Calls 8

get_infoMethod · 0.95
set_flagsMethod · 0.95
get_flagsMethod · 0.95
set_infoMethod · 0.95
remove_flagMethod · 0.95
add_flagMethod · 0.95
_check_sampleMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected