I'm puzzled by this repro:
1. system_app_test.py has a check to verify that method EnableRoot() was called on DeviceUtils object:
https://codesearch.chromium.org/chromium/src/third_party/catapult/devil/devil/android/tools/system_app_test.py?q=third_party/catapult/devil/devil/android/tools/system_app_test.py&sq=package:chromium&g=0&l=50
2. the test executes mock_device.EnableRoot.assert_called_once() unconditionally, and passes when executed:
shell> cd third_party/catapult && ./devil/bin/run_py_tests
590 tests passed, 0 skipped, 0 failures.
3. if we add 'assert False' just after that line, the test fails:
shell>
Traceback (most recent call last):
File "/path/to/src/third_party/catapult/devil/devil/android/tools/system_app_test.py", line 51, in testDoubleEnableModification
assert False
AssertionError
589 tests passed, 0 skipped, 1 failure.
So far so good..
4. if we replace the line with 'mock_device.EnableRoot.assert_not_called()' the tests still pass!
Is this an incorrect assert or the mock asserts are somehow disabled altogether?
Comment 1 Deleted