Author Anvil
Recipients Anvil
Date 2019-07-24.12:46:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Let's say I have a function that opens 2 files and compare them. mock_open would not allow me to test this case, as it would return the same data for both files (through its read_data argument).

I want to be able to do this in a mocked-open context:
with open("file1") as file1:
    assert == "data1"

with open("file2") as file2:
    assert == "data2"
Date User Action Args
2019-07-24 12:46:58Anvilsetrecipients: + Anvil
2019-07-24 12:46:58Anvilsetmessageid: <>
2019-07-24 12:46:58Anvillinkissue37669 messages
2019-07-24 12:46:58Anvilcreate