def test_string():
 schema = vol.Schema(cv.string)
 with pytest.raises(vol.MultipleInvalid):
  schema(None)
 for value in (True, 1, 'hello'):
  schema(value)

def test_string ( ) : schema = vol . Schema ( cv . string ) with pytest . raises ( vol . MultipleInvalid ) : schema ( None ) for value in ( True , 1 , 'hello' ) : schema ( value )
return true if the object is a string .