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

Method test_info_and_flags

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

Source from the content-addressed store, hash-verified

1695 self._check_sample(msg)
1696
1697 def test_info_and_flags(self):
1698 # Test interaction of info and flag methods
1699 msg = mailbox.MaildirMessage(_sample_message)
1700 self.assertEqual(msg.get_info(), '')
1701 msg.set_flags('SF')
1702 self.assertEqual(msg.get_flags(), 'FS')
1703 self.assertEqual(msg.get_info(), '2,FS')
1704 msg.set_info('1,')
1705 self.assertEqual(msg.get_flags(), '')
1706 self.assertEqual(msg.get_info(), '1,')
1707 msg.remove_flag('RPT')
1708 self.assertEqual(msg.get_flags(), '')
1709 self.assertEqual(msg.get_info(), '1,')
1710 msg.add_flag('D')
1711 self.assertEqual(msg.get_flags(), 'D')
1712 self.assertEqual(msg.get_info(), '2,D')
1713 self._check_sample(msg)
1714
1715
1716class _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