From: Artem Bityutskiy Date: Thu, 30 Jan 2014 07:05:37 +0000 (+0200) Subject: tests: cosmetic imports re-arranging X-Git-Tag: v3.2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=757350fc24ca886059427ed9b9709e5161d215e8;p=tools%2Fbmap-tools.git tests: cosmetic imports re-arranging 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 --- 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