Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Comment
by
pramttl
· 7y ago · 0 comments
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.
Comments
No comments yet.
Better HN