#NEWLINE# @ argument ( '--plain' , action = 'store_true' ) #NEWLINE# @ command ( 'coverage' , help = 'Runs all tests and builds the coverage html files' ) #NEWLINE# def coverage( args = None , plain = None ) : #NEWLINE# #INDENT# '\n    Runs the tests and creates a coverage report.\n\n    By default it creates a html report. With the argument --plain, it creates\n    a plain report and fails under a certain amount of untested lines.\n    ' #NEWLINE# if ( plain is None ) : #NEWLINE# #INDENT# plain = getattr ( args , 'plain' , False ) #NEWLINE# #UNINDENT# if plain : #NEWLINE# #INDENT# return call ( 'coverage report -m --fail-under=80' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return call ( 'coverage html' )