def minimal_line_thickness(self,c):
radius = c['<STR_LIT>']<EOL>bounds=BoundingBox(radius = radius)<EOL>xdensity = c['<STR_LIT>']<EOL>ydensity = c['<STR_LIT>']<EOL>x=c['<STR_LIT:x>']<EOL>for orientation in [<NUM_LIT:0>, pi/<NUM_LIT:4>, pi/<NUM_LIT:2>]:<EOL><INDENT>c['<STR_LIT>'] = orientation<EOL>im = imagen.Line(<EOL>scale=<NUM_LIT:1>,offset=<NUM_LIT:0>,orientation=orientation,<EOL>enforce_minimal_thickness=True,<EOL>thickness=<NUM_LIT:0.0>,x=x, y=<NUM_LIT:0.>,<EOL>smoothing=<NUM_LIT:0.0>,<EOL>xdensity=xdensity, ydensity=ydensity,<EOL>bounds=bounds)()<EOL>number_of_ones=(im==<NUM_LIT:1>).sum()<EOL>if orientation==pi/<NUM_LIT:4>:<EOL><INDENT>y_crossing=where(im[:,-<NUM_LIT:1>]>=<NUM_LIT:1>)[<NUM_LIT:0>][<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>y_crossing=<NUM_LIT:0.0><EOL><DEDENT>width_in_pixels = <NUM_LIT:2>*radius*ydensity-y_crossing<EOL>msg = """<STR_LIT>""" % (number_of_ones/float(width_in_pixels)) + str(c)<EOL>self.assertEqual(<EOL>number_of_ones, width_in_pixels,<EOL>msg=msg<EOL>)<EOL><DEDENT>
help function used by the test_* functions.

It checks that the line width is of one pixel