MCPcopy
hub / github.com/pydantic/pydantic / test_config_defaults_match

Function test_config_defaults_match

tests/test_config.py:572–582  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570
571
572def test_config_defaults_match():
573 localns = {
574 '_GenerateSchema': GenerateSchema,
575 'GenerateSchema': GenerateSchema,
576 'FieldInfo': FieldInfo,
577 'ComputedFieldInfo': ComputedFieldInfo,
578 }
579 config_dict_keys = sorted(list(get_type_hints(ConfigDict, localns=localns).keys()))
580 config_defaults_keys = sorted(list(config_defaults.keys()))
581
582 assert config_dict_keys == config_defaults_keys, 'ConfigDict and config_defaults must have the same keys'
583
584
585def test_config_is_not_inherited_in_model_fields():

Callers

nothing calls this directly

Calls 2

get_type_hintsFunction · 0.90
keysMethod · 0.80

Tested by

no test coverage detected