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

Method test_flags

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

Source from the content-addressed store, hash-verified

1729 self.assertIsNone(msg.get_unixfrom())
1730
1731 def test_flags(self):
1732 # Use get_flags(), set_flags(), add_flag(), remove_flag()
1733 msg = mailbox.mboxMessage(_sample_message)
1734 self.assertEqual(msg.get_flags(), '')
1735 msg.set_flags('F')
1736 self.assertEqual(msg.get_flags(), 'F')
1737 msg.set_flags('XODR')
1738 self.assertEqual(msg.get_flags(), 'RODX')
1739 msg.add_flag('FA')
1740 self.assertEqual(msg.get_flags(), 'RODFAX')
1741 msg.remove_flag('FDXA')
1742 self.assertEqual(msg.get_flags(), 'RO')
1743 self._check_sample(msg)
1744
1745 def _check_from(self, msg, sender=None):
1746 # 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