def test_longitude():
    'Test longitude validation.'
    schema = vol.Schema(cv.longitude)
    for value in ('invalid', None, (- 181), 181, '-181', '181', '123.01A'):
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    for value in ('-179', 179, '12.34'):
        schema(value)
Test longitude validation.
def test_longitude():
    
    schema = vol.Schema(cv.longitude)
    for value in ('invalid', None, (- 181), 181, '-181', '181', '123.01A'):
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    for value in ('-179', 179, '12.34'):
        schema(value)