[PATCH 4/5] Fix pyanaconda.kickstart import, and init logging before doing anything else.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 tests/kickstart_test/commands_test.py |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 tests/fw_test.py
 mode change 100644 => 100755 tests/kickstart_test/commands_test.py

diff --git a/tests/fw_test.py b/tests/fw_test.py
old mode 100644
new mode 100755
diff --git a/tests/kickstart_test/commands_test.py b/tests/kickstart_test/commands_test.py
old mode 100644
new mode 100755
index fcddced..8b71eb2
--- a/tests/kickstart_test/commands_test.py
+++ b/tests/kickstart_test/commands_test.py
@@ -48,8 +48,11 @@ class CommandVersionTestCase(TestCase):
             'parted',
             'block',
             'baseudev'])
-        
-        import pyanaconda.kickstart
+
+        import anaconda_log
+        anaconda_log.init()
+
+        from pyanaconda import kickstart
         import pykickstart.version
 
         self.handler = pykickstart.version.makeVersion(kickstart.ver)
@@ -58,6 +61,8 @@ class CommandVersionTestCase(TestCase):
         self.tearDownModules()
 
     def runTest(self):
+        from pyanaconda import kickstart
+
         for (commandName, commandObj) in kickstart.commandMap.iteritems():
             baseClass = commandObj().__class__.__bases__[0]
             pykickstartClass = self.handler.commands[commandName].__class__
@@ -66,12 +71,17 @@ class CommandVersionTestCase(TestCase):
 # Do the same thing as CommandVersionTestCase, but for data objects.
 class DataVersionTestCase(unittest.TestCase):
     def setUp(self):
-        import pyanaconda.kickstart
+        import anaconda_log
+        anaconda_log.init()
+
+        from pyanaconda import kickstart
         import pykickstart.version
 
         self.handler = pykickstart.version.makeVersion(kickstart.ver)
 
     def runTest(self):
+        from pyanaconda import kickstart
+
         for (dataName, dataObj) in kickstart.dataMap.iteritems():
             baseClass = dataObj().__class__.__bases__[0]
 
@@ -80,6 +90,7 @@ class DataVersionTestCase(unittest.TestCase):
             pykickstartClass = eval("self.handler.%s" % dataName)
 
             self.assertEqual(baseClass.__name__, pykickstartClass.__name__)
+
 def suite():
     suite = unittest.TestSuite()
     suite.addTest(CommandVersionTestCase())
-- 
1.7.0.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux