def test_temperature_unit():
 schema = vol.Schema(cv.temperature_unit)
 with pytest.raises(vol.MultipleInvalid):
  schema('K')
 schema('C')
 schema('F')

def test_temperature_unit ( ) : schema = vol . Schema ( cv . temperature_unit ) with pytest . raises ( vol . MultipleInvalid ) : schema ( 'K' ) schema ( 'C' ) schema ( 'F' )
test temperature unit validation .