8745: cli_test.py needs OS specific path to find Python interpreter

This commit is contained in:
Josip 2015-07-25 00:03:22 +02:00
parent faba7ddc2c
commit c19402f731

View File

@ -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)