Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 314b1b4

Browse files
committed
Now we find ipython using platutils.find_cmd
1 parent 74aae47 commit 314b1b4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

IPython/tests/test_magic.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
Needs to be run by nose (to make ipython session available).
44
"""
55

6-
# Standard library imports
76
import os
87
import sys
98
import tempfile
109
import types
1110

12-
# Third-party imports
1311
import nose.tools as nt
1412

15-
# From our own code
13+
from IPython.platutils import find_cmd
1614
from IPython.testing import decorators as dec
1715
from IPython.testing import tools as tt
1816

@@ -67,7 +65,8 @@ def test_obj_del():
6765
"""Test that object's __del__ methods are called on exit."""
6866
test_dir = os.path.dirname(__file__)
6967
del_file = os.path.join(test_dir,'obj_del.py')
70-
out = _ip.IP.getoutput('ipython %s' % del_file)
68+
ipython_cmd = find_cmd('ipython')
69+
out = _ip.IP.getoutput('%s %s' % (ipython_cmd, del_file))
7170
nt.assert_equals(out,'obj_del.py: object A deleted')
7271

7372

0 commit comments

Comments
 (0)