Commit 52824f18 authored by Jason Madden's avatar Jason Madden

Fix doctest under python3

parent d65af447
...@@ -146,14 +146,14 @@ def check_output(*popenargs, **kwargs): ...@@ -146,14 +146,14 @@ def check_output(*popenargs, **kwargs):
The arguments are the same as for the Popen constructor. Example: The arguments are the same as for the Popen constructor. Example:
>>> print(check_output(["ls", "-1", "/dev/null"])) >>> print(check_output(["ls", "-1", "/dev/null"]).decode('ascii'))
/dev/null /dev/null
<BLANKLINE> <BLANKLINE>
The stdout argument is not allowed as it is used internally. The stdout argument is not allowed as it is used internally.
To capture standard error in the result, use stderr=STDOUT. To capture standard error in the result, use stderr=STDOUT.
>>> print(check_output(["/bin/sh", "-c", "echo hello world"], stderr=STDOUT)) >>> print(check_output(["/bin/sh", "-c", "echo hello world"], stderr=STDOUT).decode('ascii'))
hello world hello world
<BLANKLINE> <BLANKLINE>
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment