Mercurial > bitten > bitten-test
diff scripts/build.py @ 144:76dea27af878
* Make the `<python:unittest>` command strip the base dir from file names in the report. Fixes #42.
* Yield reports in the order they were generated.
* The `testrunner` now splits the test name into `name` and `fixture` components (the former is commonly the name of the test function, while the latter is the name of the `TestCase` subclass.
* Parse descriptions of doctests to extract the test fixture.
* Add option to the `build.py` script to enable output of generated reports to the console.t
author | cmlenz |
---|---|
date | Sat, 20 Aug 2005 13:29:56 +0000 |
parents | 3ed8f568f60a |
children | f3f5895e373c |
line wrap: on
line diff
--- a/scripts/build.py +++ b/scripts/build.py @@ -32,6 +32,9 @@ parser = OptionParser(usage='usage: %prog [options] [step1] [step2] ...', version='%%prog %s' % VERSION) + parser.add_option('--print-reports', action='store_const', + dest='print_reports', const=True, + help='print generated reports') parser.add_option('-v', '--verbose', action='store_const', dest='loglevel', const=logging.DEBUG, help='print as much as possible') parser.add_option('-q', '--quiet', action='store_const', dest='loglevel', @@ -56,6 +59,8 @@ for type, function, output in step.execute(recipe.ctxt): if type == Recipe.ERROR: log.error('Failure in step "%s": %s', step.id, output) + elif type == Recipe.REPORT and options.print_reports: + output.write(sys.stdout, newlines=True) if step.id in steps_to_run: steps_to_run[step.id] = True