[issue12721] Chaotic use of helper functions in test_shutil for reading and writing files
Éric Araujo
report at bugs.python.org
Thu Aug 11 16:57:23 CEST 2011
Éric Araujo <merwok at netwok.org> added the comment:
I’ll make one change before committing:
Lib/test/test_shutil.py:69: if isinstance(path, (list, tuple)):
Using a list for path components does not make sense. I have changed a similar helper function in packaging to allow only tuples.
Petri: these helper functions are all about convenienve. I would reject a patch for a function just doing open+read, but here I think that doing os.path.join+open+read is worth a function. We use such helpers all the time in packaging tests and it helps reducing boilerplate, without being very hard to understand.
----------
assignee: -> eric.araujo
resolution: -> accepted
versions: +Python 2.7, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12721>
_______________________________________
More information about the Python-bugs-list
mailing list