#NEWLINE# @ mock . patch ( 'PIL.ImageFont.truetype' ) #NEWLINE# def test_string_image_tries_provided_font_path( self , m_truetype ) : #NEWLINE# #INDENT# some_string = 'asdf' #NEWLINE# some_font = 'somefont' #NEWLINE# try : #NEWLINE# #INDENT# _polygrid_module . _string_image ( some_string , font_path = some_font ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# m_truetype_args = m_truetype . call_args [ 0 ] #NEWLINE# self . assertIn ( some_font , m_truetype_args )