diff options
author | Petri Lehtinen <petri@digip.org> | 2012-06-15 17:50:51 (GMT) |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2012-06-15 17:59:31 (GMT) |
commit | 02653f1b111c8b9f64de8960d9a55d4f5821e257 (patch) | |
tree | 5455e6956ffeac421aebd3b7d9ec20ee8e40241c /Lib/test/test_mailbox.py | |
parent | 13775221e06f86b319f9591946b7ff9fb49bb907 (diff) | |
download | cpython-02653f1b111c8b9f64de8960d9a55d4f5821e257.zip cpython-02653f1b111c8b9f64de8960d9a55d4f5821e257.tar.gz cpython-02653f1b111c8b9f64de8960d9a55d4f5821e257.tar.bz2 |
#15036: Make a repeated changes and flushes work with single-file mailboxes
Diffstat (limited to 'Lib/test/test_mailbox.py')
-rw-r--r-- | Lib/test/test_mailbox.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py index f885d33e..91c8983 100644 --- a/Lib/test/test_mailbox.py +++ b/Lib/test/test_mailbox.py @@ -500,6 +500,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())) |