Merge pull request #147 from s0undt3ch/develop

[unittesting] Minor fixes regarding CentOS 5.7 and HTML reports
This commit is contained in:
Pedro Algarvio 2013-05-28 05:54:22 -07:00
commit 75eaa4d58f
3 changed files with 1 additions and 34 deletions

View file

@ -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)

View file

@ -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 ''
),

View file

@ -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
)