From 0c7e60ad8ddf68dbd8725a1e7da0f7855f9e723e Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Fri, 30 Oct 2015 13:18:12 +0100 Subject: [PATCH] Use sys.executable instead of 'python' --- test/test_compilation/test_compilation.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index d8aee822..efb6ebe4 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -5,6 +5,7 @@ import glob import logging import os +import sys import subprocess import unittest @@ -75,7 +76,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): "@DATA_FOLDER@", path2posix( subprocess.check_output( - ["python", "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long + [sys.executable, "-c", 'import patacrep, pkg_resources; print(pkg_resources.resource_filename(patacrep.__name__, "data"))'], # pylint: disable=line-too-long universal_newlines=True, cwd=os.path.dirname(songbook), ).strip() @@ -111,7 +112,7 @@ class FileTest(unittest.TestCase, metaclass=dynamic.DynamicTest): @staticmethod def compile_songbook(songbook, steps=None): """Compile songbook, and return the command return code.""" - command = ['python', '-m', 'patacrep.songbook', songbook, '-v'] + command = [sys.executable, '-m', 'patacrep.songbook', songbook, '-v'] if steps: command.extend(['--steps', steps])