Re:Mockito 2.1.0
by bebop on Monday October 03, 2016 @12:18PM
(#12628737)
I think maybe because there is no type checking in Python. This makes it more trivial to have objects that quack like a duck, without the need to explicitly create a class that conforms to an interface.
[ Parent
| on HN ]
Re:Mockito 2.1.0
by LgWoodenBadger on Monday October 03, 2016 @12:43PM
(#12628998)
FWIW, you don't do that with Mockito either, in Java land.
Mockito will happily use the existing type definition of your dependency, provided that the class declaration is not final (i.e. can't be extended).