comparison makeitso/python_package/tests/test.py @ 127:829b7f528483

DRY
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 25 May 2011 09:24:48 -0700
parents ea3225facbcf
children c07dd14d5842
comparison
equal deleted inserted replaced
126:ea3225facbcf 127:829b7f528483
48 default=False, action='store_true', 48 default=False, action='store_true',
49 help="report the first error only (all tests will still run)") 49 help="report the first error only (all tests will still run)")
50 options, args = parser.parse_args(args) 50 options, args = parser.parse_args(args)
51 51
52 # run the tests 52 # run the tests
53 results = run_tests(report_first=options.report_first, 53 results = run_tests(**options.__dict__)
54 raise_on_error=options.raise_on_error)
55 if sum([i.failed for i in results.values()]): 54 if sum([i.failed for i in results.values()]):
56 sys.exit(1) # error 55 sys.exit(1) # error
57 56
58 57
59 if __name__ == '__main__': 58 if __name__ == '__main__':