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)