From 42b4e54391e362f4dd144d0ed5bd48f1fcca5d97 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Sun, 22 Jan 2017 11:45:45 +0100 Subject: [PATCH] Use sys.executable instead of composing the executable name Better use sys.executable than using sys.version_info.major and compose the name of the python executable. --- test/test_convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_convert.py b/test/test_convert.py index fe74b0b73..208bcdb7d 100644 --- a/test/test_convert.py +++ b/test/test_convert.py @@ -40,7 +40,7 @@ class TestHelper(helper.TestHelper): # A Python script that copies the file and appends a tag. stub = os.path.join(_common.RSRC, b'convert_stub.py').decode('utf-8') - return u"python{} '{}' $source $dest {}".format(sys.version_info.major, stub, tag) + return u"{} '{}' $source $dest {}".format(sys.executable, stub, tag) def assertFileTag(self, path, tag): # noqa """Assert that the path is a file and the files content ends with `tag`.