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

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)

----------

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

Reply via email to