예제 #1
0
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)
예제 #2
0
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")