Bold link?

This commit is contained in:
Pedro Algarvio 2013-05-23 18:07:41 +01:00
parent 140ac3c602
commit d80c36842d
3 changed files with 38 additions and 2 deletions

View file

@ -9,7 +9,8 @@ script runs through a series of checks to determine operating system type and ve
install the `Salt`_ binaries using the appropriate methods.
**In case you found a bug, please read** `I found a bug`_ **first before submitting a new issue.**
**In case you found a bug, please read** `**I found a bug**`_ **first before submitting a new
issue.**
One Line Bootstrap

View file

@ -33,6 +33,8 @@ if sys.version_info < (2, 7):
expectedFailure,
TestSuite,
skipIf,
TestResult,
Testrogram
)
except ImportError:
raise SystemExit('You need to install unittest2 to run the salt tests')
@ -44,6 +46,8 @@ else:
expectedFailure,
TestSuite,
skipIf,
TestResult,
TestProgram
)

View file

@ -19,6 +19,7 @@ import tempfile
from bootstrap.unittesting import TestLoader, TextTestRunner
from bootstrap.ext.os_data import GRAINS
from bootstrap.ext.HTMLTestRunner import HTMLTestRunner
try:
from bootstrap.ext import console
width, height = console.getTerminalSize()
@ -39,6 +40,11 @@ XML_OUTPUT_DIR = os.environ.get(
tempfile.gettempdir(), 'xml-test-reports'
)
)
HTML_OUTPUT_DIR = os.environ.get(
'HTML_OUTPUT_DIR', os.path.join(
tempfile.gettempdir(), 'html-test-results'
)
)
def print_header(header, sep='~', top=True, bottom=True, inline=False,
@ -70,7 +76,7 @@ def run_suite(opts, path, display_name, suffix='[!_]*.py'):
'''
loader = TestLoader()
if opts.name:
tests = tests = loader.loadTestsFromName(display_name)
tests = loader.loadTestsFromName(display_name)
else:
tests = loader.discover(path, suffix, TEST_DIR)
@ -84,6 +90,23 @@ def run_suite(opts, path, display_name, suffix='[!_]*.py'):
output=XML_OUTPUT_DIR,
verbosity=opts.verbosity
).run(tests)
elif opts.html_out:
if not os.path.isdir(HTML_OUTPUT_DIR):
os.makedirs(HTML_OUTPUT_DIR)
for test in tests._tests:
for t in test:
print 2, t._tests
if not t._tests:
continue
print str(t._tests[0].__class__.__name__)
print dir(test)
exit(1)
runner = HTMLTestRunner(
stream=open(HTML_OUTPUT_DIR, 'w'),
verbosity=opts.verbosity
).run(tests)
TEST_RESULTS.append((header, runner))
else:
runner = TextTestRunner(
verbosity=opts.verbosity
@ -153,6 +176,14 @@ def main():
XML_OUTPUT_DIR
)
)
output_options_group.add_option(
'--html-out',
default=False,
action='store_true',
help='HTML test runner output(Output directory: {0})'.format(
HTML_OUTPUT_DIR
)
)
output_options_group.add_option(
'--no-clean',
default=False,