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

Method test_refresh

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

Source from the content-addressed store, hash-verified

814 (file_count, repetitions))
815
816 def test_refresh(self):
817 # Update the table of contents
818 self.assertEqual(self._box._toc, {})
819 key0 = self._box.add(self._template % 0)
820 key1 = self._box.add(self._template % 1)
821 self.assertEqual(self._box._toc, {})
822 self._box._refresh()
823 self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
824 key1: os.path.join('new', key1)})
825 key2 = self._box.add(self._template % 2)
826 self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
827 key1: os.path.join('new', key1)})
828 self._box._refresh()
829 self.assertEqual(self._box._toc, {key0: os.path.join('new', key0),
830 key1: os.path.join('new', key1),
831 key2: os.path.join('new', key2)})
832
833 def test_refresh_after_safety_period(self):
834 # Issue #13254: Call _refresh after the "file system safety

Callers

nothing calls this directly

Calls 4

_refreshMethod · 0.80
assertEqualMethod · 0.45
addMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected