Skip to content

Commit bef0829

Browse files
committed
Simpler assertion that the manager produces itself
1 parent 6814da0 commit bef0829

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_mailbox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ def _test_flush_or_close(self, method, should_call_close):
544544

545545
def test_use_context_manager(self):
546546
# Mailboxes are usable as a context manager
547-
with self._factory(self._path) as box:
548-
self.assertIsInstance(box, self._box.__class__)
547+
with self._box as box:
548+
self.assertIs(self._box, box)
549549

550550
def test_dump_message(self):
551551
# Write message representations to disk

0 commit comments

Comments
 (0)