[issue44503] Hide __enter__ calls in mock_open

2021-06-26 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44503] Hide __enter__ calls in mock_open

2021-06-24 Thread Pierre Ossman
Pierre Ossman added the comment: Also see Issue44185 for __exit__. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44503] Hide __enter__ calls in mock_open

2021-06-24 Thread Pierre Ossman
New submission from Pierre Ossman : I'd like to write this test case: with patch('builtins.open') as pyopen: mock_open(pyopen, read_data="foo") run() pyopen.assert_has_calls([call("filename", "wt"), call().write("gazonk"),