Centos 6 is very old, and it has old unittest library, and the newer one which
we need is called 'unittest2' there. This patch adds the corresponding
work-around to make our tests pass in Centos 6.
Change-Id: Ibf9d9185f23a79aeb2f0ecf67f8f22e1840f1a82
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
import tempfile
import filecmp
import hashlib
-import unittest
import itertools
import random
+# This is a work-around for Centos 6
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
import tests.helpers
from bmaptools import BmapCreate, BmapCopy, Fiemap, TransRead
import random
-import unittest
import itertools
+# This is a work-around for Centos 6
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
+
import tests.helpers
from bmaptools import Fiemap