2 ms·
While it's not required, there's nothing stopping you from doing any of: x: X = X(MagicMock(Y)) x: X = X(MagicMock(Y(...))) x: X = X(MagicMock(spec
by joshuamorton 4y ago
While it's not required, there's nothing stopping you from doing any of:
x: X = X(MagicMock(Y))
x: X = X(MagicMock(Y(...)))
x: X = X(MagicMock(spec=Y))
which all make it fairly clear that the Mock is of Y. (or better yet, use fakes instead of mocks)
- EdwardDiego 4y agoYeah it's the fact that it's not required that makes me insert the *.