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

Method test_flags

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

Source from the content-addressed store, hash-verified

1662 self._check_sample(msg)
1663
1664 def test_flags(self):
1665 # Use get_flags(), set_flags(), add_flag(), remove_flag()
1666 msg = mailbox.MaildirMessage(_sample_message)
1667 self.assertEqual(msg.get_flags(), '')
1668 self.assertEqual(msg.get_subdir(), 'new')
1669 msg.set_flags('F')
1670 self.assertEqual(msg.get_subdir(), 'new')
1671 self.assertEqual(msg.get_flags(), 'F')
1672 msg.set_flags('SDTP')
1673 self.assertEqual(msg.get_flags(), 'DPST')
1674 msg.add_flag('FT')
1675 self.assertEqual(msg.get_flags(), 'DFPST')
1676 msg.remove_flag('TDRP')
1677 self.assertEqual(msg.get_flags(), 'FS')
1678 self.assertEqual(msg.get_subdir(), 'new')
1679 self._check_sample(msg)
1680
1681 def test_date(self):
1682 # Use get_date() and set_date()

Callers

nothing calls this directly

Calls 7

get_flagsMethod · 0.95
get_subdirMethod · 0.95
set_flagsMethod · 0.95
add_flagMethod · 0.95
remove_flagMethod · 0.95
_check_sampleMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected