#NEWLINE# def test_template_import_parser( ) : #NEWLINE# #INDENT# parser = CheetahTemplateImportCount ( ) #NEWLINE# input_stats = [ FileDiffStat ( b'test.tmpl' , [ b'#import collections' , b'#from os import path' ] , [ b'#import os.path' , b'nothing' ] , None ) ] #NEWLINE# metrics = list ( parser . get_metrics_from_stat ( input_stats ) ) #NEWLINE# assert ( parser == [ Metric ( 'CheetahTemplateImportCount' , 1 ) ] )