tests: cosmetic imports re-arranging
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 30 Jan 2014 07:05:37 +0000 (09:05 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Fri, 31 Jan 2014 09:49:31 +0000 (11:49 +0200)
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@intel.com>
tests/test_compat.py
tests/test_filemap.py

index a1d0051e77cb164e2257152ee0c433e641be5e57..67272f633a403175165dd0b9103c5ee702205392 100644 (file)
@@ -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."""
 
index 581eb23e28f0de3df1e22807f333c5dd0c923387..16547ebc713648fab7fc1893fbe55300358145fd 100644 (file)
@@ -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