Skip to content

Commit 23825f4

Browse files
committed
Merge branch 'fix-issue-142651' of https://github.com/chaope/cpython into fix-issue-142651
2 parents 3a81b0d + f05407e commit 23825f4

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)