comparison tests/run.py @ 571:f3e5ef8760cb

tests.run: exit nonzero if tests did not pass
author Augie Fackler <durin42@gmail.com>
date Mon, 01 Mar 2010 17:45:00 -0600
parents 72e63999722f
children 930bb6df19a0
comparison
equal deleted inserted replaced
570:880ef2ac1e0d 571:f3e5ef8760cb
62 print >> sys.stderr, 'test module %s not available' % arg 62 print >> sys.stderr, 'test module %s not available' % arg
63 else: 63 else:
64 suite.append(all[arg].suite()) 64 suite.append(all[arg].suite())
65 65
66 runner = unittest.TextTestRunner(**kwargs) 66 runner = unittest.TextTestRunner(**kwargs)
67 runner.run(unittest.TestSuite(suite)) 67 result = runner.run(unittest.TestSuite(suite))
68 if not result.wasSuccessful():
69 sys.exit(1)