Esempio n. 1
0
def test_get_collection_length(road_a, road_b):
    # road_a length == 4030
    # road_b length == 2160
    output = KmlOutput('km')
    collection = {'join_type': 'arbitrary', 'ways': [road_a, road_b]}
    length = output.get_collection_length(collection)
    assert length == 6190
Esempio n. 2
0
def test_get_collection_length(road_a, road_b):
    # road_a length == 4030
    # road_b length == 2160
    output = KmlOutput('km')
    collection = {'join_type': 'arbitrary', 'ways': [road_a, road_b]}
    length = output.get_collection_length(collection)
    assert length == 6190
Esempio n. 3
0
def test_get_collection_length_on_way(road_a, road_b):
    # road_a length == 4030
    # road_b length == 2160
    output = KmlOutput('km')
    # Set a different curvature for road_b: 4000 instead of 2160
    road_b['length'] = 4000
    collection = {'join_type': 'arbitrary', 'ways': [road_a, road_b]}
    length = output.get_collection_length(collection)
    assert length == 8030
Esempio n. 4
0
def test_get_collection_length_on_way(road_a, road_b):
    # road_a length == 4030
    # road_b length == 2160
    output = KmlOutput('km')
    # Set a different curvature for road_b: 4000 instead of 2160
    road_b['length'] = 4000
    collection = {'join_type': 'arbitrary', 'ways': [road_a, road_b]}
    length = output.get_collection_length(collection)
    assert length == 8030