Yuya Nishihara <yuya@tcha.org> [Sun, 28 Sep 2014 15:13:35 +0900] rev 22565
heredoctest: do not append extra newline character to continuation line
Trailing newline characters are kept in lines.
Yuya Nishihara <yuya@tcha.org> [Sun, 28 Sep 2014 14:15:43 +0900] rev 22564
heredoctest: use the same dict for local/global contexts as in doctest
In order to mimic module-level evaluation, globals and locals should be the
same object, so doctest does not pass separate locals dict.
https://docs.python.org/2.7/reference/simple_stmts.html#exec
This fixes NameError in the following example:
>>> import foo
>>> def bar():
... foo # must exist in globalvars
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 12:37:53 +0900] rev 22563
cmdserver: drop useless in_ attribute from channeledoutput
The previous patch makes sure that in_ == out, so it's no longer needed
to keep in_ for __getattr__. Also, it seems strange for channeledoutput
to have in_ stream which is actually a writable file object.
Yuya Nishihara <yuya@tcha.org> [Sat, 27 Sep 2014 12:27:03 +0900] rev 22562
cmdserver: get file attributes of 'e'-channel from stdout, not from stderr
It seems wrong to get attributes from object different than the underlying
file. In the following example, it doesn't make sense to flush stderr after
writing to stdout:
self.ferr.write(str(a))
if not getattr(self.ferr, 'closed', False):
self.ferr.flush()