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

Method test_subdir

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

Source from the content-addressed store, hash-verified

1648 self.assertEqual(msg._info, '')
1649
1650 def test_subdir(self):
1651 # Use get_subdir() and set_subdir()
1652 msg = mailbox.MaildirMessage(_sample_message)
1653 self.assertEqual(msg.get_subdir(), 'new')
1654 msg.set_subdir('cur')
1655 self.assertEqual(msg.get_subdir(), 'cur')
1656 msg.set_subdir('new')
1657 self.assertEqual(msg.get_subdir(), 'new')
1658 self.assertRaises(ValueError, lambda: msg.set_subdir('tmp'))
1659 self.assertEqual(msg.get_subdir(), 'new')
1660 msg.set_subdir('new')
1661 self.assertEqual(msg.get_subdir(), 'new')
1662 self._check_sample(msg)
1663
1664 def test_flags(self):
1665 # Use get_flags(), set_flags(), add_flag(), remove_flag()

Callers

nothing calls this directly

Calls 5

get_subdirMethod · 0.95
set_subdirMethod · 0.95
_check_sampleMethod · 0.80
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected