assert_not_called and assert_called_once don't work in chromium |
||
Issue descriptionSee issue 878777 for details. TL;DR chromium's pymock is very old, and it treats assert_not_called() and assert_called_once as methods it should mock out (and so calling them is a NOOP). I'll use this ticket to track fixing the tests I've written/am aware of.
,
Jan 4
Sent a CL for downstream. I can't find any mistakes I've added upstream. Other (possible) instances: https://cs.chromium.org/search/?q=lang:py+%5Cbassert_(not_called%7Ccalled_once)%5Cb+-f:third_party/catapult/&sq=package:chromium&type=cs (I exclude catapult/ because it has its own mock.py in third_party/).
,
Jan 4
I can't run any of the other python files (python fails quickly because it can't find the "mock" module). So, I'll assume those authors know what they're doing.
,
Jan 5
The following revision refers to this bug: https://chrome-internal.googlesource.com/clank/internal/apps/+/81a91eb1f23e419b5a3b53278fd3a402a732ed33 commit 81a91eb1f23e419b5a3b53278fd3a402a732ed33 Author: Nate Fischer <ntfschr@google.com> Date: Sat Jan 05 00:21:52 2019
,
Jan 5
Closing out because I'm not sure how to fix the other files. No manual verification necessary. |
||
►
Sign in to add a comment |
||
Comment 1 by tobiasjs@google.com
, Jan 3