facebook / facebook/TestSlide

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

Offen
#155 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @deathowl Auf GitHub ansehen
enhancement help wanted mock_constructor
Vorherrschende Sprache
Python
Sterne
149
Forks
62
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.