Skip to content

Commit 74b9db6

Browse files
committed
Merge pull request #342 from effigies/issue_341
TST: Call current python executable in test_back_tick Allow test to run in environments where Python executable is not `python`
2 parents 8e5aa81 + 341fe76 commit 74b9db6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

nisext/tests/test_testers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
import os
66
from os.path import dirname, pathsep
77

8-
from ..testers import back_tick, run_mod_cmd
8+
from ..testers import back_tick, run_mod_cmd, PYTHON
99

10-
from nose.tools import assert_true, assert_false, assert_equal, assert_raises
10+
from nose.tools import assert_true, assert_equal, assert_raises
1111

1212

1313
def test_back_tick():
14-
cmd = 'python -c "print(\'Hello\')"'
14+
cmd = '{0} -c "print(\'Hello\')"'.format(PYTHON)
1515
assert_equal(back_tick(cmd), "Hello")
1616
assert_equal(back_tick(cmd, ret_err=True), ("Hello", ""))
1717
assert_equal(back_tick(cmd, True, False), (b"Hello", b""))
18-
cmd = 'python -c "raise ValueError()"'
18+
cmd = '{0} -c "raise ValueError()"'.format(PYTHON)
1919
assert_raises(RuntimeError, back_tick, cmd)
2020

2121

0 commit comments

Comments
 (0)