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

Method test_folder

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

Source from the content-addressed store, hash-verified

954 self.assertEqual(self._box.get_flags(key), '')
955
956 def test_folder (self):
957 # Test for bug #1569790: verify that folders returned by .get_folder()
958 # use the same factory function.
959 def dummy_factory (s):
960 return None
961 box = self._factory(self._path, factory=dummy_factory)
962 folder = box.add_folder('folder1')
963 self.assertIs(folder._factory, dummy_factory)
964
965 folder1_alias = box.get_folder('folder1')
966 self.assertIs(folder1_alias._factory, dummy_factory)
967
968 def test_directory_in_folder (self):
969 # Test that mailboxes still work if there's a stray extra directory

Callers

nothing calls this directly

Calls 4

_factoryMethod · 0.80
add_folderMethod · 0.45
assertIsMethod · 0.45
get_folderMethod · 0.45

Tested by

no test coverage detected