News for hackers. Stuff that matters.
Re:Why a mock doesn’t work by pramttl on Monday August 05, 2019 @01:32AM (#20611528)
Beautiful explanation for something that tripped me up in early days of using mock/patch. Summary: (1) Variables in Python are names that refer to values. (2) (For that reason) Mock an object where it is used, not where it is defined.

There are no comments on this comment yet.