Author anthony-flury
Recipients anthony-flury, bbayles, berker.peksag, eric.araujo, ezio.melotti, michael.foord, ned.deily, rbcollins
Date 2018-09-14.08:39:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I still support backporting to 3.6 and 3.7 : 

Yes it is correct that this fix could change the behavior of existing test code, but only if someone has written a test case for a function where : 

 1. The function under test uses dunder_iter iteration
 2. The test case provides a read_data content to mock_open
 3. The test case expects a response from the function which 
    implies that the file provided is empty/invalid in all cases - regardless of the data provided.

I simply cannot see that someone would implement a test case such as this - if your file has data, you would expect that your function under test would recognize that the data exists, if that data is valid; and most code will differentiate between invalid data and empty data.

So the only time I think this fix would change the behavior of existing code is if someone has written an illogical test case, which is currently passing and would now fail (since the test function will no2 see the data being provided and respond as such).

Specifically the only change in behavior to existing code is to highlight an invalid test case and potentially a bug in the code under test. It is for this reason I support backporting.
Date User Action Args
2018-09-14 08:39:42anthony-flurysetrecipients: + anthony-flury, rbcollins, ned.deily, ezio.melotti, eric.araujo, michael.foord, berker.peksag, bbayles
2018-09-14 08:39:42anthony-flurysetmessageid: <>
2018-09-14 08:39:42anthony-flurylinkissue32933 messages
2018-09-14 08:39:42anthony-flurycreate