facebook / facebook/TestSlide

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

Open
#155 1 comment 0 reactions 1 assignee Claimed by @deathowl View on GitHub
enhancement help wanted mock_constructor
Dominant language
Python
Stars
149
Forks
62
PR merge metrics
No merged PRs in 30d

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.