def test_Location_fromString(): l1 = Location(*xy) okay = [ '( 9.00000,5.00000)', ' (9.00000,5.00000)', '(9.00000,5.00000) ', ' ( 9.00000,5.00000) ', ' qweqdada( 9.00000,5.00000)adfafdq ', ' ( 9.00, 5) ', ' ( 9.00000, 5.00000) ' ] for p in okay: assert l1 == Location.fromString(p)
def test_Location_fromString(): l1 = Location(*xy) okay = ['( 9.00000,5.00000)', ' (9.00000,5.00000)', '(9.00000,5.00000) ', ' ( 9.00000,5.00000) ', ' qweqdada( 9.00000,5.00000)adfafdq ', ' ( 9.00, 5) ', ' ( 9.00000, 5.00000) '] for p in okay: if not l1==Location.fromString(p): error("fromString") print( "Location_fromString passed")