facebook/TestSlide

Support for classes that define `__new__` for `mock_constructor`

Open

#155 aberto em 9 de abr. de 2020

Ver no GitHub
 (1 comment) (0 reactions) (1 assignee)Python (58 forks)auto 404
enhancementhelp wantedmock_constructor

Métricas do repositório

Stars
 (147 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

It currently has no support for classes with __new__, and will reject patching those.

IIRC, it was tough getting around Python idiosyncrasies to make mock_constructor work, and I willingly decided not to implement __new__ at first to simplify things, but this is potentially doable.

Guia do colaborador