From b9ac53f16a74e78108d02f59f41755c1db4bfbc9 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Thu, 29 Oct 2015 17:02:43 +0100 Subject: [PATCH] use sys.executable to call python --- test/test_compilation/test_compilation.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/test/test_compilation/test_compilation.py b/test/test_compilation/test_compilation.py index 07c96a60..2bbccc1d 100644 --- a/test/test_compilation/test_compilation.py +++ b/test/test_compilation/test_compilation.py @@ -4,6 +4,7 @@ import glob import os +import sys import subprocess import unittest import logging @@ -96,12 +97,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'] - #Windows debugging - python_path = subprocess.check_output(['where', 'python']) - print(python_path) - python_version = subprocess.check_output(['python', '-V']) - print(python_version) + command = [sys.executable, '-m', 'patacrep.songbook', songbook, '-v'] if steps: command.extend(['--steps', steps])