MCPcopy
hub / github.com/pydantic/pydantic / test_class_var_forward_ref

Function test_class_var_forward_ref

tests/test_forward_ref.py:670–682  ·  view source on GitHub ↗
(create_module)

Source from the content-addressed store, hash-verified

668
669
670def test_class_var_forward_ref(create_module):
671 # see #3679
672 create_module(
673 # language=Python
674 """
675from __future__ import annotations
676from typing import ClassVar
677from pydantic import BaseModel
678
679class WithClassVar(BaseModel):
680 Instances: ClassVar[dict[str, WithClassVar]] = {}
681"""
682 )
683
684
685def test_recursive_model(create_module):

Callers

nothing calls this directly

Calls 1

create_moduleFunction · 0.85

Tested by

no test coverage detected