From 95468654147288a386d1e073c7216291cfb552c3 Mon Sep 17 00:00:00 2001 From: Christian Herdtweck Date: Mon, 6 May 2019 12:20:57 +0200 Subject: [PATCH] tests: Do not assume we are running CPython --- tests/msodde/test_crypto.py | 6 +++--- tests/olevba/test_crypto.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/msodde/test_crypto.py b/tests/msodde/test_crypto.py index 2eb0273..187b60b 100644 --- a/tests/msodde/test_crypto.py +++ b/tests/msodde/test_crypto.py @@ -2,7 +2,7 @@ import sys import unittest -from os.path import join as pjoin +from os.path import basename, join as pjoin from tests.test_utils import DATA_BASE_DIR @@ -11,8 +11,8 @@ from oletools import msodde @unittest.skipIf(not crypto.check_msoffcrypto(), - 'Module msoffcrypto not installed for python{}.{}' - .format(sys.version_info.major, sys.version_info.minor)) + 'Module msoffcrypto not installed for {}' + .format(basename(sys.executable))) class MsoddeCryptoTest(unittest.TestCase): """Test integration of decryption in msodde.""" def test_standard_password(self): diff --git a/tests/olevba/test_crypto.py b/tests/olevba/test_crypto.py index 7021fd8..aad78df 100644 --- a/tests/olevba/test_crypto.py +++ b/tests/olevba/test_crypto.py @@ -2,7 +2,7 @@ import sys import unittest -from os.path import join as pjoin +from os.path import basename, join as pjoin import json from collections import OrderedDict @@ -12,8 +12,8 @@ from oletools import crypto @unittest.skipIf(not crypto.check_msoffcrypto(), - 'Module msoffcrypto not installed for python{}.{}' - .format(sys.version_info.major, sys.version_info.minor)) + 'Module msoffcrypto not installed for {}' + .format(basename(sys.executable))) class OlevbaCryptoWriteProtectTest(unittest.TestCase): """ Test documents that are 'write-protected' through encryption. -- libgit2 0.21.4