danielgtaylor / danielgtaylor/python-betterproto
_get_field_default_gen does not return the correct generator when freezegun is in use
Abierto
- Lenguaje dominante
- Python
- Estrellas
- 1.8k
- Forks
- 234
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
The function `_get_field_default_gen` checks if a field's type is a datetime using `t is datetime`, which means if freezegun is being used in a test it generates the wrong default generator function.
Suggest this changes to `t instanceof datetime` to support cases like this.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.