Show More
@@ -216,18 +216,12 b' def ipexec(fname, options=None):' | |||
|
216 | 216 | full_fname = os.path.join(test_dir, fname) |
|
217 | 217 | full_cmd = '%s %s %s' % (ipython_cmd, cmdargs, full_fname) |
|
218 | 218 | #print >> sys.stderr, 'FULL CMD:', full_cmd # dbg |
|
219 | out = getoutputerror(full_cmd) | |
|
220 |
# `import readline` causes 'ESC[?1034h' to be |
|
|
221 | # so strip that off the front of the first line if it is found | |
|
219 | out, err = getoutputerror(full_cmd) | |
|
220 | # `import readline` causes 'ESC[?1034h' to be output sometimes, | |
|
221 | # so strip that out before doing comparisons | |
|
222 | 222 | if out: |
|
223 | first = out[0] | |
|
224 | m = re.match(r'\x1b\[[^h]+h', first) | |
|
225 | if m: | |
|
226 | # strip initial readline escape | |
|
227 | out = list(out) | |
|
228 | out[0] = first[len(m.group()):] | |
|
229 | out = tuple(out) | |
|
230 | return out | |
|
223 | out = re.sub(r'\x1b\[[^h]+h', '', out) | |
|
224 | return out, err | |
|
231 | 225 | |
|
232 | 226 | |
|
233 | 227 | def ipexec_validate(fname, expected_out, expected_err='', |
General Comments 0
You need to be logged in to leave comments.
Login now