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

Method test_subdir

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

Source from the content-addressed store, hash-verified

1633 self.assertEqual(msg._info, '')
1634
1635 def test_subdir(self):
1636 # Use get_subdir() and set_subdir()
1637 msg = mailbox.MaildirMessage(_sample_message)
1638 self.assertEqual(msg.get_subdir(), 'new')
1639 msg.set_subdir('cur')
1640 self.assertEqual(msg.get_subdir(), 'cur')
1641 msg.set_subdir('new')
1642 self.assertEqual(msg.get_subdir(), 'new')
1643 self.assertRaises(ValueError, lambda: msg.set_subdir('tmp'))
1644 self.assertEqual(msg.get_subdir(), 'new')
1645 msg.set_subdir('new')
1646 self.assertEqual(msg.get_subdir(), 'new')
1647 self._check_sample(msg)
1648
1649 def test_flags(self):
1650 # 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