[bmap-tools] [PATCH 4/8] tests: cosmetic imports re-arranging
Artem Bityutskiy
dedekind1 at gmail.com
Fri Jan 31 06:58:47 EST 2014
From: Artem Bityutskiy <artem.bityutskiy at intel.com>
Just arrange the imports at the beginning of the files so that they would look
the same in all the tests. Just for consistency.
Change-Id: I6d8044f01a100075271bef3e737bb67daf90340f
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at intel.com>
---
tests/test_compat.py | 12 ++++++------
tests/test_filemap.py | 6 ++----
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/tests/test_compat.py b/tests/test_compat.py
index a1d0051..67272f6 100644
--- a/tests/test_compat.py
+++ b/tests/test_compat.py
@@ -30,6 +30,12 @@ import tempfile
from tests import helpers
from bmaptools import TransRead, BmapCopy
+# This is a work-around for Centos 6
+try:
+ import unittest2 as unittest # pylint: disable=F0401
+except ImportError:
+ import unittest
+
# Test image file name
_IMAGE_NAME = "test.image.gz"
# Test bmap file names template
@@ -39,12 +45,6 @@ _TEST_DATA_SUBDIR = "test-data"
# Name of the subdirectory where old BmapCopy modules are stored
_OLDCODEBASE_SUBDIR = "oldcodebase"
-# This is a work-around for Centos 6
-try:
- import unittest2 as unittest # pylint: disable=F0401
-except ImportError:
- import unittest
-
class TestCompat(unittest.TestCase):
"""The test class for this unit test."""
diff --git a/tests/test_filemap.py b/tests/test_filemap.py
index 581eb23..16547eb 100644
--- a/tests/test_filemap.py
+++ b/tests/test_filemap.py
@@ -25,6 +25,8 @@ files and makes sure the module returns correct information about the holes.
import random
import itertools
+import tests.helpers
+from bmaptools import Filemap
# This is a work-around for Centos 6
try:
@@ -32,10 +34,6 @@ try:
except ImportError:
import unittest
-
-import tests.helpers
-from bmaptools import Filemap
-
class Error(Exception):
"""A class for exceptions generated by this test."""
pass
--
1.8.3.1
More information about the Bmap-tools
mailing list