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

Method test_nullable_field

python/pyfory/tests/test_field_meta.py:99–107  ·  view source on GitHub ↗

Test nullable field.

(self)

Source from the content-addressed store, hash-verified

97 assert meta.uses_tag_id()
98
99 def test_nullable_field(self):
100 """Test nullable field."""
101
102 @dataclass
103 class TestClass:
104 optional_name: Optional[str] = pyfory.field(0, nullable=True)
105
106 meta = extract_field_meta(fields(TestClass)[0])
107 assert meta.nullable is True
108
109 def test_ref_field(self):
110 """Test ref tracking field."""

Callers

nothing calls this directly

Calls 1

extract_field_metaFunction · 0.90

Tested by

no test coverage detected