Show More
@@ -209,14 +209,10 b" def temp_pyfile(src, ext='.py'):" | |||||
209 | def default_argv(): |
|
209 | def default_argv(): | |
210 | """Return a valid default argv for creating testing instances of ipython""" |
|
210 | """Return a valid default argv for creating testing instances of ipython""" | |
211 |
|
211 | |||
212 | # Get the install directory for the user configuration and tell ipython to |
|
212 | return ['--quick', # so no config file is loaded | |
213 | # use the default profile from there. |
|
213 | # Other defaults to minimize side effects on stdout | |
214 | from IPython.config import default |
|
214 | '--colors=NoColor', '--no-term-title','--no-banner', | |
215 | ipcdir = os.path.dirname(default.__file__) |
|
215 | '--autocall=0'] | |
216 | ipconf = os.path.join(ipcdir,'ipython_config.py') |
|
|||
217 | return ['--colors=NoColor', '--no-term-title','--no-banner', |
|
|||
218 | '--config-file="%s"' % ipconf, '--autocall=0', |
|
|||
219 | '--prompt-out=""'] |
|
|||
220 |
|
216 | |||
221 |
|
217 | |||
222 | def ipexec(fname, options=None): |
|
218 | def ipexec(fname, options=None): | |
@@ -240,7 +236,11 b' def ipexec(fname, options=None):' | |||||
240 | (stdout, stderr) of ipython subprocess. |
|
236 | (stdout, stderr) of ipython subprocess. | |
241 | """ |
|
237 | """ | |
242 | if options is None: options = [] |
|
238 | if options is None: options = [] | |
243 | cmdargs = ' '.join(default_argv() + options) |
|
239 | ||
|
240 | # For these subprocess calls, eliminate all prompt printing so we only see | |||
|
241 | # output from script execution | |||
|
242 | prompt_opts = ['--prompt-in1=""', '--prompt-in2=""', '--prompt-out=""'] | |||
|
243 | cmdargs = ' '.join(default_argv() + prompt_opts + options) | |||
244 |
|
244 | |||
245 | _ip = get_ipython() |
|
245 | _ip = get_ipython() | |
246 | test_dir = os.path.dirname(__file__) |
|
246 | test_dir = os.path.dirname(__file__) |
General Comments 0
You need to be logged in to leave comments.
Login now