Show More
@@ -270,6 +270,7 b' def embed(**kwargs):' | |||||
270 | if config is None: |
|
270 | if config is None: | |
271 | config = load_default_config() |
|
271 | config = load_default_config() | |
272 | config.InteractiveShellEmbed = config.TerminalInteractiveShell |
|
272 | config.InteractiveShellEmbed = config.TerminalInteractiveShell | |
|
273 | config.InteractiveShellEmbed.colors='nocolor' | |||
273 | kwargs['config'] = config |
|
274 | kwargs['config'] = config | |
274 | #save ps1/ps2 if defined |
|
275 | #save ps1/ps2 if defined | |
275 | ps1 = None |
|
276 | ps1 = None |
@@ -64,7 +64,7 b' def test_nest_embed():' | |||||
64 | ipy_prompt = r']:' #ansi color codes give problems matching beyond this |
|
64 | ipy_prompt = r']:' #ansi color codes give problems matching beyond this | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | child = pexpect.spawn('%s -m IPython'%(sys.executable, )) |
|
67 | child = pexpect.spawn('%s -m IPython --colors=nocolor'%(sys.executable, )) | |
68 | child.expect(ipy_prompt) |
|
68 | child.expect(ipy_prompt) | |
69 | child.sendline("from __future__ import print_function") |
|
69 | child.sendline("from __future__ import print_function") | |
70 | child.expect(ipy_prompt) |
|
70 | child.expect(ipy_prompt) | |
@@ -123,3 +123,5 b' def test_nest_embed():' | |||||
123 | child.sendline("print('true' if IPython.get_ipython() is ip0 else 'false')") |
|
123 | child.sendline("print('true' if IPython.get_ipython() is ip0 else 'false')") | |
124 | assert(child.expect(['true\r\n', 'false\r\n']) == 0) |
|
124 | assert(child.expect(['true\r\n', 'false\r\n']) == 0) | |
125 | child.expect(ipy_prompt) |
|
125 | child.expect(ipy_prompt) | |
|
126 | child.sendline('exit') | |||
|
127 | child.close() |
General Comments 0
You need to be logged in to leave comments.
Login now