Ejemplo n.º 1
0
def test_pos():
    para1 = 44.5
    para2 = 4.25
    para3 = 10
    para4 = 'nord'

    sortie = 44.41, 4.25
    assert script_pos.long_lat(para1, para2, para3, para4) == sortie
Ejemplo n.º 2
0
def function_map(data):
    """Calling all function"""

    lat, long = ville(data)
    adresse = dress_to_ville(lat, long)
    position_vent = vent_deux(data)
    vent = superficie_ville(adresse[1])
    nouvelle_position = long_lat(lat, long, vent, position_vent)

    return nouvelle_position, lat, long
Ejemplo n.º 3
0
def function_map3(lat, long, listee, index, data):
    """Second function if the trials insn't
    the first one"""

    lat = float(lat)
    long = listee[index:-1]
    long = "".join(long)
    long = float(long)

    adresse = dress_to_ville(lat, long)
    position_vent = vent_deux(data)
    vent = superficie_ville(adresse[1])
    nouvelle_position = long_lat(lat, long, vent, position_vent)

    return nouvelle_position, lat, long
Ejemplo n.º 4
0
def function_map(data):
    """This function call ville from ville,
    dress_to_ville from addresse, vent_deux
    from vent, long_lat from nouvel_pos.
    We recup the latitude and longitude,
    the direction of the wind, the area of the city
    and we calcul the new lattitude and longitude."""

    lat, long = ville(data)
    adresse = dress_to_ville(lat, long)
    position_vent = vent_deux(data)
    vent = superficie_ville(adresse[1])
    nouvelle_position = long_lat(lat, long, vent, position_vent)

    return nouvelle_position, lat, long