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