summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_mailbox.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-06-15 23:04:29 (GMT)
committerBrett Cannon <brett@python.org>2012-06-15 23:04:29 (GMT)
commit24aa693c7ef8f217fbd238eb7af7d828e13a07eb (patch)
tree7d01ab630c2e8eef1e168b1aa5d84131b60cfd50 /Lib/test/test_mailbox.py
parent99d776fdf4aa5a66266ebcec2263fab501f03088 (diff)
parent016ef551a793f72f582d707ce5bb55bf4940cf27 (diff)
downloadcpython-24aa693c7ef8f217fbd238eb7af7d828e13a07eb.zip
cpython-24aa693c7ef8f217fbd238eb7af7d828e13a07eb.tar.gz
cpython-24aa693c7ef8f217fbd238eb7af7d828e13a07eb.tar.bz2
Merge
Diffstat (limited to 'Lib/test/test_mailbox.py')
-rw-r--r--Lib/test/test_mailbox.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_mailbox.py b/Lib/test/test_mailbox.py
index 0fe4bd9..cb54505 100644
--- a/Lib/test/test_mailbox.py
+++ b/Lib/test/test_mailbox.py
@@ -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()))