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

Method test_flags

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

Source from the content-addressed store, hash-verified

1744 self.assertIsNone(msg.get_unixfrom())
1745
1746 def test_flags(self):
1747 # Use get_flags(), set_flags(), add_flag(), remove_flag()
1748 msg = mailbox.mboxMessage(_sample_message)
1749 self.assertEqual(msg.get_flags(), '')
1750 msg.set_flags('F')
1751 self.assertEqual(msg.get_flags(), 'F')
1752 msg.set_flags('XODR')
1753 self.assertEqual(msg.get_flags(), 'RODX')
1754 msg.add_flag('FA')
1755 self.assertEqual(msg.get_flags(), 'RODFAX')
1756 msg.remove_flag('FDXA')
1757 self.assertEqual(msg.get_flags(), 'RO')
1758 self._check_sample(msg)
1759
1760 def _check_from(self, msg, sender=None):
1761 # Check contents of "From " line

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected