Skip to content

Commit 6bb8347

Browse files
committed
gh-150175: Add news entry for ThreadingMock race condition fix
1 parent ba116c3 commit 6bb8347

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)