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

Method test_folder

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

Source from the content-addressed store, hash-verified

948 self.assertEqual(self._box.get_flags(key), '')
949
950 def test_folder (self):
951 # Test for bug #1569790: verify that folders returned by .get_folder()
952 # use the same factory function.
953 def dummy_factory (s):
954 return None
955 box = self._factory(self._path, factory=dummy_factory)
956 folder = box.add_folder('folder1')
957 self.assertIs(folder._factory, dummy_factory)
958
959 folder1_alias = box.get_folder('folder1')
960 self.assertIs(folder1_alias._factory, dummy_factory)
961
962 def test_directory_in_folder (self):
963 # 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