From 5c32fc8c10a2a3d6314c26a94b08fa5dfd624668 2012-03-11 06:44:25 From: MinRK Date: 2012-03-11 06:44:25 Subject: [PATCH] unpack out,err in ipexec Code reflected the possibility that getoutputerror could return None, but this is no longer the case. It always returns two strings. --- diff --git a/IPython/testing/tools.py b/IPython/testing/tools.py index dff9130..61136d8 100644 --- a/IPython/testing/tools.py +++ b/IPython/testing/tools.py @@ -216,14 +216,12 @@ def ipexec(fname, options=None): full_fname = os.path.join(test_dir, fname) full_cmd = '%s %s %s' % (ipython_cmd, cmdargs, full_fname) #print >> sys.stderr, 'FULL CMD:', full_cmd # dbg - out = getoutputerror(full_cmd) + out, err = getoutputerror(full_cmd) # `import readline` causes 'ESC[?1034h' to be output sometimes, # so strip that out before doing comparisons if out: - out,err = out out = re.sub(r'\x1b\[[^h]+h', '', out) - out = out,err - return out + return out, err def ipexec_validate(fname, expected_out, expected_err='',