Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment:

mock can only verify if the function is called with the correct number of 
arguments as you have passed spec. It doesn't verify whether the function 
implementation is correct like calling Something.foobar() because it's not 
designed to verify the function implementation. It wouldn't raise an exception 
even when self.foo(1, 2) is called inside x.bar because runtime code is not 
executed and only the signature is checked with mock. I think this is an 
expected behavior and not a bug.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to