From 4779579c477c2f409b5a8f02a58007ef1d905dc6 2013-07-15 17:55:38 From: MinRK Date: 2013-07-15 17:55:38 Subject: [PATCH] don't assume tested ipython is on the PATH Use more portable / reliable `python -m IPython` especially helpful when there are many Pythons, or PATH is not reliable (Windows). --- diff --git a/IPython/testing/tools.py b/IPython/testing/tools.py index 0c5b346..43e44fe 100644 --- a/IPython/testing/tools.py +++ b/IPython/testing/tools.py @@ -187,7 +187,7 @@ def ipexec(fname, options=None): _ip = get_ipython() test_dir = os.path.dirname(__file__) - ipython_cmd = find_cmd('ipython3' if py3compat.PY3 else 'ipython') + ipython_cmd = [sys.executable, '-m', 'IPython'] # Absolute path for filename full_fname = os.path.join(test_dir, fname) full_cmd = '%s %s %s' % (ipython_cmd, cmdargs, full_fname)