summaryrefslogtreecommitdiff
path: root/tests/test_bio.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2015-10-13 14:51:24 +0200
committerMatěj Cepl <mcepl@cepl.eu>2015-10-13 15:23:06 +0200
commita4e8e60f95ce6b2c1e4bc5d804d6521392bfa66b (patch)
tree5bb242ba3646b2df8322c2555975c4244ca4588e /tests/test_bio.py
parent1b5f8bbe04280558dfe577a2df203eaf0600c473 (diff)
downloadm2crypto-a4e8e60f95ce6b2c1e4bc5d804d6521392bfa66b.tar.gz
Switch unit testing to have at least 2.7 unittest API available.
Fixes #48
Diffstat (limited to 'tests/test_bio.py')
-rw-r--r--tests/test_bio.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_bio.py b/tests/test_bio.py
index 1d7b0c3..88b6902 100644
--- a/tests/test_bio.py
+++ b/tests/test_bio.py
@@ -8,8 +8,11 @@ Copyright (c) 1999-2003 Ng Pheng Siong. All rights reserved.
Copyright (c) 2006 Open Source Applications Foundation
Author: Heikki Toivonen
"""
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
-import unittest
from M2Crypto import BIO, Rand
from fips import fips_mode