Nick Coghlan added the comment: A good start, but:
1. io is too low level to depend on unittest (or even contextlib), as anything it imports will be imported automatically at interpreter startup. The context manager will need to be written out directly as a class with the appropriate methods. 2. The name based API should accept the unqualified name and throw a value error if an unexpected name is passed in. 3. The stdin replacement should have a separate optional keyword-only "data" argument to request wrapping with StringIO, rather than duck typing the replacement value. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15805> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com