8745: cli_test.py needs OS specific path to find Python interpreter
This commit is contained in:
parent
9ddc1cb487
commit
22c32f4c92
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
""" CLI tests for gramps """
|
""" CLI tests for gramps """
|
||||||
|
|
||||||
|
import sys
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
import re
|
import re
|
||||||
@ -72,10 +73,11 @@ class Test(unittest.TestCase):
|
|||||||
# This tests the fix for bug #1331-1334
|
# This tests the fix for bug #1331-1334
|
||||||
# read trivial gedcom input, write gedcom output
|
# read trivial gedcom input, write gedcom output
|
||||||
def test2_exec_CLI(self):
|
def test2_exec_CLI(self):
|
||||||
|
pyexec = sys.executable
|
||||||
ifile = min1r
|
ifile = min1r
|
||||||
ofile = out_ged
|
ofile = out_ged
|
||||||
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
|
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,
|
stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE, shell=True)
|
stderr=subprocess.PIPE, shell=True)
|
||||||
@ -104,10 +106,11 @@ class Test(unittest.TestCase):
|
|||||||
f.write("garbage")
|
f.write("garbage")
|
||||||
|
|
||||||
# ~same as test 2
|
# ~same as test 2
|
||||||
|
pyexec = sys.executable
|
||||||
ifile = min1r
|
ifile = min1r
|
||||||
ofile = out_ged
|
ofile = out_ged
|
||||||
gcmd = "Gramps.py -i %s -e %s" % (ifile, ofile)
|
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,
|
stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE, shell=True)
|
stderr=subprocess.PIPE, shell=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user