#NEWLINE# def test_string_image_is_about_double_height_with_newline( self ) : #NEWLINE# #INDENT# char = 'a' #NEWLINE# image_without_newline = _polygrid_module . _string_image ( char ) #NEWLINE# char_with_newline = ( ( char + '\\n' ) + char ) #NEWLINE# image_with_newline = _polygrid_module . _string_image ( char_with_newline ) #NEWLINE# h_single_line = image_without_newline . size [ 1 ] #NEWLINE# h_min_spec = ( 2 * h_single_line ) #NEWLINE# h_max_spec = ( 3.5 * h_single_line ) #NEWLINE# h_double = image_with_newline . size [ 1 ] #NEWLINE# self . assertTrue ( ( h_min_spec <= h_double <= h_max_spec ) , 'Height of text with newline was unexpectedly not about double the height of a single line.\nExpected between {} and {} but got {}' . format ( h_min_spec , h_max_spec , h_double ) )