mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
#15036: Make a repeated changes and flushes work with single-file mailboxes
This commit is contained in:
commit
a717d563d0
3 changed files with 16 additions and 0 deletions
|
@ -504,6 +504,17 @@ class TestMailbox(TestBase):
|
|||
# Write changes to disk
|
||||
self._test_flush_or_close(self._box.flush, True)
|
||||
|
||||
def test_popitem_and_flush_twice(self):
|
||||
# See #15036.
|
||||
self._box.add(self._template % 0)
|
||||
self._box.add(self._template % 1)
|
||||
self._box.flush()
|
||||
|
||||
self._box.popitem()
|
||||
self._box.flush()
|
||||
self._box.popitem()
|
||||
self._box.flush()
|
||||
|
||||
def test_lock_unlock(self):
|
||||
# Lock and unlock the mailbox
|
||||
self.assertFalse(os.path.exists(self._get_lock_path()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue