#NEWLINE# def test_unitstmt_factory( ) : #NEWLINE# #INDENT# ' Test UnitStmt factory method\n    ' #NEWLINE# line = 'INCH,LZ' #NEWLINE# stmt = UnitStmt . from_excellon ( line ) #NEWLINE# assert_equal ( stmt . units , 'inch' ) #NEWLINE# assert_equal ( stmt . zeros , 'leading' ) #NEWLINE# line = 'INCH,TZ' #NEWLINE# stmt = UnitStmt . from_excellon ( line ) #NEWLINE# assert_equal ( stmt . units , 'inch' ) #NEWLINE# assert_equal ( line . zeros , 'trailing' ) #NEWLINE# line = 'METRIC,LZ' #NEWLINE# stmt = UnitStmt . from_excellon ( line ) #NEWLINE# assert_equal ( stmt . units , 'metric' ) #NEWLINE# assert_equal ( stmt . zeros , 'leading' ) #NEWLINE# line = 'METRIC,TZ' #NEWLINE# stmt = UnitStmt . from_excellon ( line ) #NEWLINE# assert_equal ( stmt . units , 'metric' ) #NEWLINE# assert_equal ( stmt . zeros , 'trailing' )