We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba116c3 commit 6bb8347Copy full SHA for 6bb8347
1 file changed
Misc/NEWS.d/next/Library/2026-05-21-fix-threadingmock-race.rst
@@ -0,0 +1,4 @@
1
+Fix race condition in :class:`unittest.mock.ThreadingMock` where
2
+concurrent calls could lose increments to :attr:`~unittest.mock.Mock.call_count`
3
+and other attributes. Fixed by overriding ``_increment_mock_call`` in
4
+:class:`~unittest.mock.ThreadingMixin` with proper lock protection.
0 commit comments