Anthony Flury <anthony.fl...@btinternet.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32933>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to