From 22c32f4c92e6fe4a29146ad2c223ae6fcd57771e Mon Sep 17 00:00:00 2001 From: Josip Date: Sat, 25 Jul 2015 00:15:17 +0200 Subject: [PATCH] 8745: cli_test.py needs OS specific path to find Python interpreter --- gramps/cli/test/cli_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gramps/cli/test/cli_test.py b/gramps/cli/test/cli_test.py index 4ceb47be9..252f0eb61 100644 --- a/gramps/cli/test/cli_test.py +++ b/gramps/cli/test/cli_test.py @@ -20,6 +20,7 @@ """ CLI tests for gramps """ +import sys import os import unittest import re @@ -72,10 +73,11 @@ class Test(unittest.TestCase): # This tests the fix for bug #1331-1334 # read trivial gedcom input, write gedcom output def test2_exec_CLI(self): + pyexec = sys.executable ifile = min1r ofile = out_ged gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile) - process = subprocess.Popen("python3 %s" % gcmd, + process = subprocess.Popen("%s %s" % (pyexec, gcmd), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) @@ -104,10 +106,11 @@ class Test(unittest.TestCase): f.write("garbage") # ~same as test 2 + pyexec = sys.executable ifile = min1r ofile = out_ged gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile) - process = subprocess.Popen("python3 %s" % gcmd, + process = subprocess.Popen("%s %s" % (pyexec, gcmd), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)