#test-isolation

[ follow ]
fromNedbatchelder
2 days ago
Python

Why your mock breaks later

Patch mocks where the object is used, not where it's defined, to avoid unintended, global effects on other libraries and test infrastructure.
[ Load more ]