Message340172
An interesting thing is that there is GCC in CI that runs under coverage which also passed since this requires a Python tracing function before importing mock to trigger this as in the original report. Adding a simple tracer at the top of testmock.py file does cause an instance check failure without patch and passes with the merged patch.
$ ./python.exe Lib/unittest/test/testmock/testmock.py
.......................................F.................s..............................................F.......
======================================================================
FAIL: test_class_assignable (__main__.MockTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib/unittest/test/testmock/testmock.py", line 1828, in test_class_assignable
self.assertIsInstance(mock, int)
AssertionError: <Mock spec='int' id='4405923920'> is not an instance of <class 'int'>
======================================================================
FAIL: test_spec_class (__main__.MockTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib/unittest/test/testmock/testmock.py", line 775, in test_spec_class
self.assertIsInstance(mock, X)
AssertionError: <Mock spec='X' id='4405437744'> is not an instance of <class '__main__.MockTest.test_spec_class.<locals>.X'>
----------------------------------------------------------------------
Ran 112 tests in 3.834s
FAILED (failures=2, skipped=1) |
|
Date |
User |
Action |
Args |
2019-04-13 19:33:22 | xtreak | set | recipients:
+ xtreak, nedbat, cjw296, michael.foord, mariocj89, pablogsal, miss-islington |
2019-04-13 19:33:22 | xtreak | set | messageid: <1555184002.29.0.800776102715.issue36593@roundup.psfhosted.org> |
2019-04-13 19:33:22 | xtreak | link | issue36593 messages |
2019-04-13 19:33:22 | xtreak | create | |
|