[issue12824] Make the write_file() helper function in test_shutil return the file name it wrote to

Éric Araujo report at bugs.python.org
Tue Aug 23 11:00:51 CEST 2011


Éric Araujo <merwok at netwok.org> added the comment:

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.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12824>
_______________________________________


More information about the Python-bugs-list mailing list