From: Ben Finney Date: Sat, 2 Dec 2017 02:30:17 +0000 (+1100) Subject: Invoke Python interpreter by the name from `sys.executable`. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=bf183f5bba33d8d03825799fc92506b010c7cd7f;p=redacted-XKCD-password-generator.git Invoke Python interpreter by the name from `sys.executable`. --- diff --git a/tests/test_xkcdpass.py b/tests/test_xkcdpass.py index 33e61ce..70aad5f 100644 --- a/tests/test_xkcdpass.py +++ b/tests/test_xkcdpass.py @@ -1,4 +1,5 @@ import re +import sys import subprocess import unittest @@ -34,7 +35,7 @@ class XkcdPasswordTests(unittest.TestCase): def test_commandlineCount(self): count = 5 result = subprocess.check_output([ - "python", "xkcdpass/xkcd_password.py", + sys.executable, "xkcdpass/xkcd_password.py", "-w", WORDFILE, "-c", str(count), ])