mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Merge pull request #147 from s0undt3ch/develop
[unittesting] Minor fixes regarding CentOS 5.7 and HTML reports
This commit is contained in:
commit
75eaa4d58f
3 changed files with 1 additions and 34 deletions
|
@ -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)
|
||||
|
|
|
@ -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 ''
|
||||
),
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue