Author williamsjoblom
Recipients williamsjoblom
Date 2021-05-20.08:17:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1621498625.9.0.422400740011.issue44185@roundup.psfhosted.org>
In-reply-to
Content
A common testing scenario is assuring that opened files are closed. Since unittest.mock.mock_open() can be used as a context manager, it would be reasonable to expect its __exit__ to invoke close so that one can easily assert that the file was closed, regardless of if the file was opened with a plain call to open or with a context manager.
History
Date User Action Args
2021-05-20 08:17:05williamsjoblomsetrecipients: + williamsjoblom
2021-05-20 08:17:05williamsjoblomsetmessageid: <1621498625.9.0.422400740011.issue44185@roundup.psfhosted.org>
2021-05-20 08:17:05williamsjoblomlinkissue44185 messages
2021-05-20 08:17:05williamsjoblomcreate