Skip to content

Commit dc0d804

Browse files
chaopepicnixz
andauthored
Update Misc/NEWS.d/next/Library/2025-12-13-06-17-44.gh-issue-142651.ZRtBu4.rst
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent 3a4b590 commit dc0d804

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
Fixed a thread safety issue in :mod:`unittest.mock` where :attr:`~unittest.mock.Mock.call_count` could return inaccurate values when a mock was called concurrently from multiple threads. The attribute now derives its value from the length of :attr:`~unittest.mock.Mock.call_args_list` to ensure consistency.
1+
:mod:`unittest.mock`: fix a thread safety issue where :attr:`Mock.call_count
2+
<unittest.mock.Mock.call_count>` may return inaccurate values when the mock
3+
is called concurrently from multiple threads.

0 commit comments

Comments
 (0)