From 8974d5e49f602993a559dd25b8d30c9fb112703b Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 28 May 2013 13:09:35 +0100 Subject: [PATCH 1/2] Removed the unittest TestProgram import because of the HTML reports. We don't need it. --- tests/bootstrap/ext/HTMLTestRunner.py | 31 --------------------------- tests/bootstrap/unittesting.py | 2 -- 2 files changed, 33 deletions(-) diff --git a/tests/bootstrap/ext/HTMLTestRunner.py b/tests/bootstrap/ext/HTMLTestRunner.py index 7904e49..efb1121 100644 --- a/tests/bootstrap/ext/HTMLTestRunner.py +++ b/tests/bootstrap/ext/HTMLTestRunner.py @@ -93,7 +93,6 @@ Version in 0.7.1 import datetime import StringIO import sys -import time import unittest from xml.sax import saxutils @@ -832,33 +831,3 @@ class HTMLTestRunner(Template_mixin): def _generate_ending(self): return self.ENDING_TMPL - - -############################################################################## -# Facilities for running tests from the command line -############################################################################## - -# Note: Reuse unittest.TestProgram to launch test. In the future we may -# build our own launcher to support more specific command line -# parameters like test title, CSS, etc. -class TestProgram(unittest.TestProgram): - """ - A variation of the unittest.TestProgram. Please refer to the base - class for command line parameters. - """ - def runTests(self): - # Pick HTMLTestRunner as the default test runner. - # base class's testRunner parameter is not useful because it means - # we have to instantiate HTMLTestRunner before we know self.verbosity. - if self.testRunner is None: - self.testRunner = HTMLTestRunner(verbosity=self.verbosity) - unittest.TestProgram.runTests(self) - -main = TestProgram - -############################################################################## -# Executing this module from the command line -############################################################################## - -if __name__ == "__main__": - main(module=None) diff --git a/tests/bootstrap/unittesting.py b/tests/bootstrap/unittesting.py index 98a515c..a00f4f5 100644 --- a/tests/bootstrap/unittesting.py +++ b/tests/bootstrap/unittesting.py @@ -34,7 +34,6 @@ if sys.version_info < (2, 7): TestSuite, skipIf, TestResult, - Testrogram ) except ImportError: raise SystemExit('You need to install unittest2 to run the salt tests') @@ -47,7 +46,6 @@ else: TestSuite, skipIf, TestResult, - TestProgram ) From d4a0808a432c8b73b1710bcd1c14c78a6b68da27 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 28 May 2013 13:38:14 +0100 Subject: [PATCH 2/2] Un-installing `m2crypto` in CentOS-5.7 pulls in `yum`. We can't remove `yum`! --- tests/bootstrap/test_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bootstrap/test_install.py b/tests/bootstrap/test_install.py index 13a9a95..70c42af 100644 --- a/tests/bootstrap/test_install.py +++ b/tests/bootstrap/test_install.py @@ -38,7 +38,7 @@ CLEANUP_COMMANDS_BY_OS_FAMILY = { ], 'RedHat': [ 'yum -y remove salt-minion salt-master', - 'yum -y remove python{0}-m2crypto m2crypto python{0}-crypto ' + 'yum -y remove python{0}-m2crypto python{0}-crypto ' 'python{0}-msgpack python{0}-zmq python{0}-jinja2'.format( GRAINS['osrelease'].split('.')[0] == '5' and '26' or '' ),