You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a bunch of manually-defined stub classes in place throughout the codebase. Suggested pros for replacement:
mock.Mock confines to the test what the expectation is, using a format that contributors are going to be familiar with. Having to look up should not be necessary.
Improved / standardized assertions (assert_called_once_with and friends).
Cons:
Lots of churn, potentially introducing bugs.
DRYing out frequently-used mock setups means that users still have to go look up the helper, rather than a class: the class can be more "transparent" than the imperative setup (e.g., just add a class-scope attribute, rather than adjusting both the value passed to the mock and its scope).
The text was updated successfully, but these errors were encountered:
From discussion on #3500.
There are a bunch of manually-defined stub classes in place throughout the codebase. Suggested pros for replacement:
mock.Mock
confines to the test what the expectation is, using a format that contributors are going to be familiar with. Having to look up should not be necessary.assert_called_once_with
and friends).Cons:
scope
).The text was updated successfully, but these errors were encountered: