Comment

Comment by pramttl

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.
parent pramttl 7 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton