#NEWLINE# @ manager . command #NEWLINE# def cov( ) : #NEWLINE# #INDENT# 'Runs the unit tests with coverage.' #NEWLINE# tests = unittest . TestLoader ( ) . discover ( 'tests' ) #NEWLINE# unittest . TextTestRunner ( verbosity = 2 ) . run ( covdir ) #NEWLINE# COV . stop ( ) #NEWLINE# COV . save ( ) #NEWLINE# print ( 'Coverage Summary:' ) #NEWLINE# COV . report ( ) #NEWLINE# basedir = os . path . abspath ( os . path . dirname ( __file__ ) ) #NEWLINE# covdir = os . path . join ( basedir , 'tmp/coverage' ) #NEWLINE# COV . html_report ( directory = covdir ) #NEWLINE# print ( ( 'HTML version: file://%s/index.html' % covdir ) ) #NEWLINE# COV . erase ( )