Randy Syring added the comment: Old functionality:
(temp)rsyring@loftex:~/projects/hllapi-src$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mock >>> mock.__version__ '1.0.0' >>> m = mock.Mock() >>> m.assert_screen_status.call_count 0 New functionality: (temp)rsyring@loftex:~/projects/hllapi-src$ python Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mock >>> mock.__version__ '1.1.0' >>> m = mock.Mock() >>> m.assert_screen_status.call_count Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/rsyring/.virtualenvs/temp/local/lib/python2.7/site-packages/mock/mock.py", line 714, in __getattr__ raise AttributeError(name) AttributeError: assert_screen_status In my case, the objects I was patching had a legit method like assert_screen_status(). But, after upgrading Mock, the use of those methods started throwing AttributeError's even though it was very obvious that a) the methods existed on the real objects and b) Mock is supposed to let me call anything on I want. As I said previously, this was a VERY confusing situation to figure out. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24758> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com