aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_plugin_syntax.py
diff options
context:
space:
mode:
authorastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-02-17 16:27:19 +0000
committerastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-02-17 16:27:19 +0000
commit494f1de1db6c29a3f5f6d0e5cabc29b86eaf99e8 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/tests/test_plugin_syntax.py
parent006e26f2a226bd4f934dcd98c598cc5830c0b285 (diff)
downloadsos-494f1de1db6c29a3f5f6d0e5cabc29b86eaf99e8.tar.gz
-blah
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@777 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src/tests/test_plugin_syntax.py')
-rw-r--r--src/tests/test_plugin_syntax.py32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/tests/test_plugin_syntax.py b/src/tests/test_plugin_syntax.py
deleted file mode 100644
index 1b0ae31d..00000000
--- a/src/tests/test_plugin_syntax.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import unittest
-import sys
-import os
-import sos.policyredhat
-from sos.helpers import *
-
-class testPluginSanity(unittest.TestCase):
- def setUp(self):
- self.policy = sos.policyredhat.SosPolicy()
- # build plugins list
- paths = sys.path
- for path in paths:
- if path.strip()[-len("site-packages"):] == "site-packages" \
- and os.path.isdir(path + "/sos/plugins"):
- pluginpath = path + "/sos/plugins"
- self.plugins = os.listdir(pluginpath)
- self.plugins.sort()
-
- def test_plugin_load(self):
- for plug in self.plugins:
- plugbase = plug[:-3]
- if not plug[-3:] == '.py' or plugbase == "__init__":
- continue
- try:
- loadPlugin = importPlugin("sos.plugins." + plugbase, plugbase)
- except:
- self.fail("Plugin exception on %s" % (plugbase,))
-
-if __name__=="__main__":
- suite = unittest.TestLoader().loadTestsFromTestCase(testPluginSanity)
- unittest.TextTestRunner(verbosity=2).run(suite)
-