From 515cfd02561ecdc6dfe9873a597c28a8808eaa3f Mon Sep 17 00:00:00 2001 From: y-p Date: Thu, 5 Dec 2013 00:04:20 +0200 Subject: [PATCH] TST: prevent stderr from leaking to console in util.testing --- pandas/util/testing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/util/testing.py b/pandas/util/testing.py index 1904b5f0be49d..8c5704e151638 100644 --- a/pandas/util/testing.py +++ b/pandas/util/testing.py @@ -145,7 +145,8 @@ def check_output(*popenargs, **kwargs): # shamelessly taken from Python 2.7 sou """ if 'stdout' in kwargs: raise ValueError('stdout argument not allowed, it will be overridden.') - process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) + process = subprocess.Popen(stdout=subprocess.PIPE,stderr=subprocess.PIPE, + *popenargs, **kwargs) output, unused_err = process.communicate() retcode = process.poll() if retcode: @@ -160,7 +161,7 @@ def _default_locale_getter(): try: raw_locales = check_output(['locale -a'], shell=True) except subprocess.CalledProcessError as e: - raise type(e)("%s, the 'locale -a' command cannot be foundon your " + raise type(e)("%s, the 'locale -a' command cannot be found on your " "system" % e) return raw_locales