Hm, I don’t think the patch makes the test easier to read or maintain. As I wrote in the commit message for #12721:
> For simple open then read/write calls, I have left the usual idiom
> (with open + read/write), as it is short and readable enough.
In the current tests, sometimes os.path.join is called and the resulting name (e.g. src) is used to write contents and then as argument to a shutil function; I actually prefer that src paths are created right before dst and with similar code.
So I think I’ll reject this patch. |