[blivet:master 3/5] Move import to top level.

mulhern amulhern at redhat.com
Wed Apr 2 18:30:46 UTC 2014


Signed-off-by: mulhern <amulhern at redhat.com>
---
 tests/devicelibs_test/crypto_test.py | 5 +----
 tests/devicelibs_test/swap_test.py   | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/tests/devicelibs_test/crypto_test.py b/tests/devicelibs_test/crypto_test.py
index e395dfa..675fee1 100755
--- a/tests/devicelibs_test/crypto_test.py
+++ b/tests/devicelibs_test/crypto_test.py
@@ -4,6 +4,7 @@ import unittest
 import tempfile
 import os
 
+from blivet.devicelibs import crypto
 from tests.devicelibs_test import baseclass
 
 #FIXME: some of these tests expect behavior which is not correct
@@ -32,7 +33,6 @@ class CryptoTestCase(baseclass.DevicelibsTestCase):
         _LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]]
         _LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]]
 
-        import blivet.devicelibs.crypto as crypto
 
         ##
         ## is_luks
@@ -139,7 +139,6 @@ class CryptoTestCase2(baseclass.DevicelibsTestCase):
 
     def tearDown(self):
         """Close all devices just in case they are still open."""
-        import blivet.devicelibs.crypto as crypto
         for name in self._names.values():
             try:
                 crypto.luks_close(name)
@@ -155,8 +154,6 @@ class CryptoTestCase2(baseclass.DevicelibsTestCase):
         _name0 = self._names[self._LOOP_DEVICES[0]]
         _name1 = self._names[self._LOOP_DEVICES[1]]
 
-        import blivet.devicelibs.crypto as crypto
-
         ##
         ## luks_format
         ##
diff --git a/tests/devicelibs_test/swap_test.py b/tests/devicelibs_test/swap_test.py
index 4a721f6..70f7870 100755
--- a/tests/devicelibs_test/swap_test.py
+++ b/tests/devicelibs_test/swap_test.py
@@ -2,6 +2,8 @@
 import os
 import unittest
 
+import blivet.devicelibs.swap as swap
+
 from tests.devicelibs_test import baseclass
 
 class SwapTestCase(baseclass.DevicelibsTestCase):
@@ -11,7 +13,6 @@ class SwapTestCase(baseclass.DevicelibsTestCase):
         _LOOP_DEV0 = self._loopMap[self._LOOP_DEVICES[0]]
         _LOOP_DEV1 = self._loopMap[self._LOOP_DEVICES[1]]
 
-        import blivet.devicelibs.swap as swap
 
         ##
         ## mkswap
-- 
1.8.3.1



More information about the anaconda-patches mailing list