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)

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 )
test longitude validation .