#NEWLINE# def test_endofprogramstmt_conversion( ) : #NEWLINE# #INDENT# settings = FileSettings ( ) #NEWLINE# settings . units = 'metric' #NEWLINE# stmt = EndOfProgramStmt . from_excellon ( 'M30X0254Y254' , settings ) #NEWLINE# stmt . to_metric ( ) #NEWLINE# assert_equal ( stmt . x , 2.54 ) #NEWLINE# assert_equal ( stmt . y , 25.4 ) #NEWLINE# stmt . to_inch ( ) #NEWLINE# assert_equal ( stmt . units , 'inch' ) #NEWLINE# assert_equal ( stmt . x , 0.1 ) #NEWLINE# assert_equal ( stmt . y , 1.0 ) #NEWLINE# stmt . to_inch ( ) #NEWLINE# assert_equal ( stmt . x , 0.1 ) #NEWLINE# assert_equal ( stmt . y , 1.0 ) #NEWLINE# settings . units = 'inch' #NEWLINE# stmt = EndOfProgramStmt . from_excellon ( 'M30X01Y1' , settings ) #NEWLINE# stmt . to_inch ( ) #NEWLINE# assert_equal ( stmt . x , 1.0 ) #NEWLINE# assert_equal ( stmt . y , 10.0 ) #NEWLINE# stmt . to_metric ( ) #NEWLINE# assert_equal ( stmt . units , 'metric' ) #NEWLINE# assert_equal ( stmt . x , 25.4 ) #NEWLINE# assert_equal ( stmt . y , 254.0 ) #NEWLINE# stmt . to_metric ( ) #NEWLINE# assert_equal ( stmt . x , 25.4 ) #NEWLINE# assert_equal ( stmt . y , 254.0 )