4 ms·
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 cre
by bebop 10y ago
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.
- LgWoodenBadger 10y agoFWIW, 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).
- raphw 10y agoThis is actually not a requirement anymore. Mockito 2 can mock final types and methods.