Invoke Python interpreter by the name from `sys.executable`.
authorBen Finney <redacted>
Sat, 2 Dec 2017 02:30:17 +0000 (13:30 +1100)
committerBen Finney <redacted>
Sat, 2 Dec 2017 02:30:17 +0000 (13:30 +1100)
tests/test_xkcdpass.py

index 33e61ceb3747eb5a0d0c699ce025a2da03f069a4..70aad5f35116a4b18cd57d18b289bd73b5e042da 100644 (file)
@@ -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),
         ])
git clone https://git.99rst.org/PROJECT