예제 #1
0
def test_get_coordinates_without_exif():
    photo = Photo(helper.get_file('no-exif.jpg'))
    latitude = photo.get_coordinate('latitude')
    longitude = photo.get_coordinate('longitude')

    assert latitude is None, latitude
    assert longitude is None, longitude
예제 #2
0
def test_get_coordinates_with_null_coordinate():
    photo = Photo(helper.get_file('with-null-coordinates.jpg'))
    latitude = photo.get_coordinate('latitude')
    longitude = photo.get_coordinate('longitude')

    assert latitude is None, latitude
    assert longitude is None, longitude
예제 #3
0
def test_get_coordinates_with_zero_coordinate():
    photo = Photo(helper.get_file('with-location-zero-coordinate.jpg'))
    latitude = photo.get_coordinate('latitude')
    longitude = photo.get_coordinate('longitude')

    assert helper.isclose(latitude, 51.55325), latitude
    assert helper.isclose(longitude, -0.00417777777778), longitude
예제 #4
0
def test_get_coordinate_longitude_plus():
    photo = Photo(helper.get_file('with-location-inv.jpg'))
    coordinate = photo.get_coordinate('longitude')

    assert helper.isclose(coordinate,122.033383611), coordinate
예제 #5
0
def test_get_coordinate_latitude_minus():
    photo = Photo(helper.get_file('with-location-inv.jpg'))
    coordinate = photo.get_coordinate('latitude')

    assert helper.isclose(coordinate,-37.3667027222), coordinate
예제 #6
0
def test_get_coordinate_default():
    photo = Photo(helper.get_file('with-location.jpg'))
    coordinate = photo.get_coordinate()

    assert helper.isclose(coordinate,37.3667027222), coordinate
예제 #7
0
파일: photo_test.py 프로젝트: noonat/elodie
def test_get_coordinate_longitude():
    photo = Photo(helper.get_file('with-location.jpg'))
    coordinate = photo.get_coordinate('longitude')

    assert coordinate == -122.033383611, coordinate
예제 #8
0
파일: photo_test.py 프로젝트: noonat/elodie
def test_get_coordinate_latitude():
    photo = Photo(helper.get_file('with-location.jpg'))
    coordinate = photo.get_coordinate('latitude')

    assert coordinate == 37.3667027222, coordinate
예제 #9
0
def test_get_coordinate_longitude():
    photo = Photo(helper.get_file("with-location.jpg"))
    coordinate = photo.get_coordinate("longitude")

    assert coordinate == -122.033383611, coordinate
예제 #10
0
def test_get_coordinate_latitude():
    photo = Photo(helper.get_file("with-location.jpg"))
    coordinate = photo.get_coordinate("latitude")

    assert coordinate == 37.3667027222, coordinate