MCPcopy Create free account
hub / github.com/apache/fory / test_ref_field

Method test_ref_field

python/pyfory/tests/test_field_meta.py:109–117  ·  view source on GitHub ↗

Test ref tracking field.

(self)

Source from the content-addressed store, hash-verified

107 assert meta.nullable is True
108
109 def test_ref_field(self):
110 """Test ref tracking field."""
111
112 @dataclass
113 class TestClass:
114 friends: List["TestClass"] = pyfory.field(0, ref=True, default_factory=list)
115
116 meta = extract_field_meta(fields(TestClass)[0])
117 assert meta.ref is True
118
119 def test_ignore_field(self):
120 """Test ignored field."""

Callers

nothing calls this directly

Calls 1

extract_field_metaFunction · 0.90

Tested by

no test coverage detected