#NEWLINE# def test_excellontool_factory( ) : #NEWLINE# #INDENT# ' Test ExcellonTool factory methods\n    ' #NEWLINE# exc_line = 'T8F01B02S00003H04Z05C0.12500' #NEWLINE# settings = FileSettings ( format = ( 2 , 5 ) , zero_suppression = 'trailing' , units = 'inch' , notation = 'absolute' ) #NEWLINE# tool = ExcellonTool . from_excellon ( settings , settings ) #NEWLINE# assert_equal ( tool . number , 8 ) #NEWLINE# assert_equal ( tool . diameter , 0.125 ) #NEWLINE# assert_equal ( tool . feed_rate , 1 ) #NEWLINE# assert_equal ( tool . retract_rate , 2 ) #NEWLINE# assert_equal ( tool . rpm , 3 ) #NEWLINE# assert_equal ( tool . max_hit_count , 4 ) #NEWLINE# assert_equal ( tool . depth_offset , 5 ) #NEWLINE# stmt = { #NEWLINE# #INDENT# 'number' : 8 , #NEWLINE# 'feed_rate' : 1 , #NEWLINE# 'retract_rate' : 2 , #NEWLINE# 'rpm' : 3 , #NEWLINE# 'diameter' : 0.125 , #NEWLINE# 'max_hit_count' : 4 , #NEWLINE# 'depth_offset' : 5 , #NEWLINE# #UNINDENT# } #NEWLINE# tool = ExcellonTool . from_dict ( settings , stmt ) #NEWLINE# assert_equal ( tool . number , 8 ) #NEWLINE# assert_equal ( tool . diameter , 0.125 ) #NEWLINE# assert_equal ( tool . feed_rate , 1 ) #NEWLINE# assert_equal ( tool . retract_rate , 2 ) #NEWLINE# assert_equal ( tool . rpm , 3 ) #NEWLINE# assert_equal ( tool . max_hit_count , 4 ) #NEWLINE# assert_equal ( tool . depth_offset , 5 )