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

Method test_flags

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

Source from the content-addressed store, hash-verified

1647 self._check_sample(msg)
1648
1649 def test_flags(self):
1650 # Use get_flags(), set_flags(), add_flag(), remove_flag()
1651 msg = mailbox.MaildirMessage(_sample_message)
1652 self.assertEqual(msg.get_flags(), '')
1653 self.assertEqual(msg.get_subdir(), 'new')
1654 msg.set_flags('F')
1655 self.assertEqual(msg.get_subdir(), 'new')
1656 self.assertEqual(msg.get_flags(), 'F')
1657 msg.set_flags('SDTP')
1658 self.assertEqual(msg.get_flags(), 'DPST')
1659 msg.add_flag('FT')
1660 self.assertEqual(msg.get_flags(), 'DFPST')
1661 msg.remove_flag('TDRP')
1662 self.assertEqual(msg.get_flags(), 'FS')
1663 self.assertEqual(msg.get_subdir(), 'new')
1664 self._check_sample(msg)
1665
1666 def test_date(self):
1667 # 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