Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPython.utils.process.getoutput returns stderr #3280

Closed
juliantaylor opened this issue May 5, 2013 · 0 comments · Fixed by #3301
Closed

IPython.utils.process.getoutput returns stderr #3280

juliantaylor opened this issue May 5, 2013 · 0 comments · Fixed by #3301
Labels
Milestone

Comments

@juliantaylor
Copy link
Contributor

the doc of IPython.utils.process.getoutput says is returns stdout, but it returns stderr too.
To reproduce fix the broken testcase due to multiple definition:

--- a/IPython/utils/tests/test_process.py
+++ b/IPython/utils/tests/test_process.py
@@ -125,7 +125,7 @@ def test_getoutput_quoted2(self):
         out = getoutput("python -c 'print (\"1\")'")
         self.assertEqual(out.strip(), '1')

-    def test_getoutput(self):
+    def test_getoutput_error(self):

and get:

FAIL: test_getoutput

self.assertEqual(out, 'on stdout')
AssertionError: 'on stdouton stderr' != 'on stdout'
- on stdouton stderr
+ on stdout
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
it returns both stdout and stderr
closes ipythongh-3280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant