#NEWLINE# def test_simple_base_counter( ) : #NEWLINE# #INDENT# 'Smoke test for SimpleLineCounterBase' #NEWLINE# class TestCounter ( SimpleLineCounterBase ) : #NEWLINE# #INDENT# def should_include_file( self , file_diff_stat ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# def line_matches_metric( self , line , file_diff_stat ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# parser = TestCounter ( ) #NEWLINE# assert ( parser . get_possible_metric_ids ( ) == [ 'TestCounter' ] ) #NEWLINE# input_stats = [ FileDiffStat ( 'test.py' , [ 'a' , 'b' , 'c' ] , [ 'd' ] , 'this_should_be_ignored' ) ] #NEWLINE# metrics = list ( parser . get_metrics_from_stat ( metrics ) ) #NEWLINE# assert ( metrics == [ Metric ( 'TestCounter' , 2 ) ] )