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