Skip to content

Commit 0212eb0

Browse files
committed
test: add inverse test
1 parent 12db74e commit 0212eb0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/libs/test_pydantic.py

+2
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,10 @@ class MyModel(BaseModel):
748748
def test_parent_nullable_means_children_nullable():
749749
class MyParent(BaseModel):
750750
optional_child: Optional[ChildModel]
751+
non_optional_child: ChildModel
751752
dlt_config: ClassVar[DltConfig] = {"skip_nested_types": True}
752753

753754
schema = pydantic_to_table_schema_columns(MyParent)
754755

755756
assert schema["optional_child__child_attribute"]["nullable"]
757+
assert schema["non_optional_child__child_attribute"]["nullable"] is True

0 commit comments

Comments
 (0)