summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-07-11 16:40:04 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-07-14 11:33:13 +0200
commitfdf629196062319bba60fa13c606ed4ba80a41ff (patch)
tree696d0fc36119b954a0d82bc1f20e665e765b7a2a /testsuite
parentc5c3e6cae831bd2d88358bcb1df63f6bab3c66e6 (diff)
downloadfirstaidkit-fdf629196062319bba60fa13c606ed4ba80a41ff.tar.gz
firstaidkit-fdf629196062319bba60fa13c606ed4ba80a41ff.tar.xz
firstaidkit-fdf629196062319bba60fa13c606ed4ba80a41ff.zip
Fix the format of the firstaidkit file.
- Indendtation should be 4 spaces. There was a function indented with 8 spaces. - Lines should be shorted than 80 chars. It just looks pretty :) Think of terminals whith only 80 char of length. Think of debuging in rescue mode. - Change also the print statements. Just getting ready for python 3000. - Get some spaces between elifs - There should not be any lines ending in spaces. - This can all be read in the python code conventions http://www.python.org/dev/peps/pep-0008/
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/__init__.py6
-rw-r--r--testsuite/initialization.py22
-rw-r--r--testsuite/initialization/pluginInfo.py10
3 files changed, 23 insertions, 15 deletions
diff --git a/testsuite/__init__.py b/testsuite/__init__.py
index d302cc0..a809d90 100644
--- a/testsuite/__init__.py
+++ b/testsuite/__init__.py
@@ -1,16 +1,16 @@
# First Aid Kit - diagnostic and repair tool for Linux
# Copyright (C) 2008 Joel Granados <jgranado@redhat.com>
-#
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
diff --git a/testsuite/initialization.py b/testsuite/initialization.py
index 81e3b52..9b62c30 100644
--- a/testsuite/initialization.py
+++ b/testsuite/initialization.py
@@ -29,9 +29,11 @@ class Initialization(unittest.TestCase):
self.confPath = self.contentdir+"/initialization.conf"
Config.read(self.confPath)
initLogger(Config)
- self.pluginSystem = PluginSystem(reporting=Reports(), dependencies=Dependencies())
+ self.pluginSystem = PluginSystem(reporting=Reports(),
+ dependencies=Dependencies())
self.plugin = self.pluginSystem.getplugin("pluginInfo")
- py_compile.compile("%s/pycFile" % self.contentdir, cfile="%s/pycFile.pyc" % self.contentdir)
+ py_compile.compile("%s/pycFile" % self.contentdir,
+ cfile="%s/pycFile.pyc" % self.contentdir)
def tearDown(self):
if(os.path.isfile(Config.log.filename)):
@@ -41,13 +43,16 @@ class Imports(Initialization):
"""Tests the capability of importing 3 typs of files."""
def testImportsPy(self):
- self.assert_('pyFile' in self.pluginSystem.list(), "Firstaidkit failed to import a 'py' file.")
+ self.assert_('pyFile' in self.pluginSystem.list(),
+ "Firstaidkit failed to import a 'py' file.")
def testImportsPyc(self):
- self.assert_('pycFile' in self.pluginSystem.list(), "Firstaidkit failed to import a 'pyc' file.")
+ self.assert_('pycFile' in self.pluginSystem.list(),
+ "Firstaidkit failed to import a 'pyc' file.")
def testImportsDir(self):
- self.assert_('directory' in self.pluginSystem.list(), "Firstaidkit failed to import from a directory.")
+ self.assert_('directory' in self.pluginSystem.list(),
+ "Firstaidkit failed to import from a directory.")
class Info(Initialization):
"""Test the infomration from the plugins."""
@@ -61,8 +66,11 @@ class Info(Initialization):
self.assertEqual(self.plugin.version, "3.4.5")
def testInfoFlowName(self):
- self.assert_('newflow' in self.plugin.getFlows(), "Firstaidkit failed to show access the flow name")
+ self.assert_('newflow' in self.plugin.getFlows(),
+ "Firstaidkit failed to show access the flow name")
def testInfoFlowDescription(self):
- self.assert_('This is the newflow' == self.plugin.getFlow("newflow").description, "Firstaidkit failed to show access the flow name")
+ self.assert_('This is the newflow' == \
+ self.plugin.getFlow("newflow").description,
+ "Firstaidkit failed to show access the flow name")
diff --git a/testsuite/initialization/pluginInfo.py b/testsuite/initialization/pluginInfo.py
index 8b2d80f..1b29a4f 100644
--- a/testsuite/initialization/pluginInfo.py
+++ b/testsuite/initialization/pluginInfo.py
@@ -24,11 +24,11 @@ class PluginInfo(Plugin):
author = "John Galt"
flows={}
flows["newflow"] = Flow({
- Plugin.initial: {Return: "prepare"},
- "prepare" : {ReturnSuccess: "fix"},
- "fix" : {ReturnSuccess: "clean", ReturnFailure: "clean"},
- "clean" : {ReturnSuccess: Plugin.final}
- }, description="This is the newflow")
+ Plugin.initial: {Return: "prepare"},
+ "prepare" : {ReturnSuccess: "fix"},
+ "fix" : {ReturnSuccess: "clean", ReturnFailure: "clean"},
+ "clean" : {ReturnSuccess: Plugin.final}
+ }, description="This is the newflow")
def __init__(self, *args, **kwargs):
Plugin.__init__(self, *args, **kwargs)