litestar-org / polyfactory

Simple and powerful factories for mock data generation
https://polyfactory.litestar.dev/
MIT License
1k stars 78 forks source link

test: add test for union handling #489

Closed guacs closed 7 months ago

guacs commented 7 months ago

Description

This PR adds a test to confirm that the union handling is fixed. The fix was introduced in #468 as a result of removing the unwrapping of unions in polyfactory.utils.helpers.unwrap_annotation and moving it to polyfactory.factories.BaseFactory.get_field_value.

Close Issue(s)

guacs commented 7 months ago

Pydantic v1 strikes again :/

guacs commented 7 months ago

Superseded by #491.