def test_ordered_dict_key_validator():
 schema = vol.Schema(cv.ordered_dict(cv.match_all, cv.string))
 with pytest.raises(vol.Invalid):
  schema({None: 1})
 schema({'hello': 'world'})
 schema = vol.Schema(cv.ordered_dict(cv.match_all, int))
 with pytest.raises(vol.Invalid):
  schema({'hello': 1})
 schema({1: 'works'})

def test_ordered_dict_key_validator ( ) : schema = vol . Schema ( cv . ordered_dict ( cv . match_all , cv . string ) ) with pytest . raises ( vol . Invalid ) : schema ( { None : 1 } ) schema ( { 'hello' : 'world' } ) schema = vol . Schema ( cv . ordered_dict ( cv . match_all , int ) ) with pytest . raises ( vol . Invalid ) : schema ( { 'hello' : 1 } ) schema ( { 1 : 'works' } )
test ordered_dict key validator .