Skip to content

Commit

Permalink
Merge pull request #3342 from minrk/executable
Browse files Browse the repository at this point in the history
fix test_find_cmd_python
  • Loading branch information
takluyver committed May 24, 2013
2 parents 840b829 + 4b0a6ee commit c751c59
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
5 changes: 1 addition & 4 deletions IPython/utils/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ def find_cmd(cmd):
This function tries to determine the full path to a command line program
using `which` on Unix/Linux/OS X and `win32api` on Windows. Most of the
time it will use the version that is first on the users `PATH`. If
cmd is `python` return `sys.executable`.
time it will use the version that is first on the users `PATH`.
Warning, don't use this to find IPython command line programs as there
is a risk you will find the wrong one. Instead find those using the
Expand All @@ -59,8 +58,6 @@ def find_cmd(cmd):
cmd : str
The command line program to look for.
"""
if cmd == 'python':
return os.path.abspath(sys.executable)
try:
path = _find_cmd(cmd).rstrip()
except OSError:
Expand Down
4 changes: 0 additions & 4 deletions IPython/utils/tests/test_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
# Tests
#-----------------------------------------------------------------------------

def test_find_cmd_python():
"""Make sure we find sys.exectable for python."""
nt.assert_equal(find_cmd(python), sys.executable)


@dec.skip_win32
def test_find_cmd_ls():
"""Make sure we can find the full path to ls."""
Expand Down

0 comments on commit c751c59

Please sign in to comment.