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.