diff --git a/libraries/tests/qa.py b/libraries/tests/qa.py new file mode 100644 index 000000000..2cb29a119 --- /dev/null +++ b/libraries/tests/qa.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +import sys +sys.path.insert(0, '.') +sys.path.insert(0, '../') +import unittest +import entropy.qa +from entropy.output import TextInterface +import tests._misc as _misc +import tempfile + +class QATest(unittest.TestCase): + + def setUp(self): + text = TextInterface() + self.QA = entropy.qa.QAInterface(text) + + def tearDown(self): + """ + tearDown is run after each test + """ + sys.stdout.write("%s ran\n" % (self,)) + sys.stdout.flush() + + def test_package_qa(self): + pkgs = [_misc.get_test_entropy_package4(), + _misc.get_test_entropy_package3(), + _misc.get_test_entropy_package2(), + _misc.get_test_entropy_package() + ] + for pkg in pkgs: + self.assert_(self.QA.entropy_package_checks(pkg)) + +if __name__ == '__main__': + unittest.main() diff --git a/libraries/tests/run b/libraries/tests/run index a849c339e..fb5991dc5 100755 --- a/libraries/tests/run +++ b/libraries/tests/run @@ -14,11 +14,11 @@ sys.path.insert(0,'../') # set unit testing mode from entropy.const import etpSys etpSys['unittest'] = True -from tests import db, client, server, misc, transceivers, tools, i18n, spm +from tests import db, client, server, misc, transceivers, tools, i18n, spm, qa rc = 0 # Add to the list the module to test -mods = [db, client, server, misc, transceivers, tools, i18n, spm] +mods = [db, client, server, misc, transceivers, tools, i18n, spm, qa] tests = [] for mod in mods: diff --git a/libraries/tests/spm.py b/libraries/tests/spm.py index c6cfeac8a..02f19acc4 100644 --- a/libraries/tests/spm.py +++ b/libraries/tests/spm.py @@ -10,7 +10,7 @@ import tests._misc as _misc import tempfile import shutil -class ToolsTest(unittest.TestCase): +class SpmTest(unittest.TestCase): def setUp(self): self.Client = Client(noclientdb = 2, indexing = False, xcache = False,