COMMITS
/ Lib/unittest/mock.py May 12, 2026
S
March 20, 2026
M
gh-145754: Update signature retrieval in unittest.mock to use forwardref annotation format (#145756)
Matthias Schoettle committed
March 10, 2026
K
gh-142651: use `NonCallableMock._lock` for thread safety of `call_count` (#142922)
Kumar Aditya committed
December 15, 2025
C
gh-142651: make `Mock.call_count` thread-safe (#142656)
chaope committed
August 14, 2025
R
gh-137716: Fix double period in AttributeError message for invalid mock assertions (#137717)
ROHAN WINSOR committed
June 28, 2025
W
Fix a typo in Lib/unittest/mock.py (#136067)
Weilin Du committed
June 14, 2025
S
gh-135368: Fix mocks on dataclass specs with `instance=True` (#135421)
sobolevn committed
November 13, 2024
September 27, 2024
S
September 26, 2024
S
gh-124234: Improve docs for `Mock.reset_mock` (#124237)
sobolevn committed
September 19, 2024
S
gh-123934: Fix `MagicMock` not to reset magic method return values (#124038)
sobolevn committed
September 14, 2024
S
Remove unused variable in `MagicMixin._mock_set_magics` (#124092)
sobolevn committed
August 11, 2024
W
gh-122858: Deprecate `asyncio.iscoroutinefunction` (#122875)
Wulian committed
July 15, 2024
D
gh-117765: Improve documentation for `mocker.patch.dict` (#121755)
Dominic H committed
June 19, 2024
N
gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (#120737)
Nikita Sobolev committed
June 11, 2024
B
R
gh-119600: mock: do not access attributes of original when new_callable is set (#119601)
Robert Collins committed
May 22, 2024
G
Remove almost all unpaired backticks in docstrings (#119231)
Geoffrey Thomas committed
May 2, 2024
I
March 8, 2024
I
gh-75988: Fix issues with autospec ignoring wrapped object (#115223)
infohash committed
January 4, 2024
W
gh-113569: Display calls in Mock.assert_has_calls failure when empty (GH-113573)
wookie184 committed
December 24, 2023
S
gh-113407: Fix import of unittest.mock when CPython is built without docstrings (GH-113408)
Serhiy Storchaka committed
October 18, 2023
J
July 11, 2023
C
Remove unused branches from mock module (#106617)
Chris Withers committed
July 10, 2023
M
GH-61215: threadingmock: Remove unused branch for `timeout` (#106591)
Mario Corchero committed
July 4, 2023
M
gh-61215: Rename `wait_until_any_call` to `wait_until_any_call_with` (#106414)
Mario Corchero committed
July 3, 2023
M
gh-61215: New mock to wait for multi-threaded events to happen (#16094)
Mario Corchero committed
June 11, 2023
S
bpo-44185: Added close() to mock_open __exit__ (#26902)
Samet YASLAN committed
June 9, 2023
T
gh-94924: support `inspect.iscoroutinefunction` in `create_autospec(async_def)` (#94962)
Thomas Grainger committed
May 23, 2023
M
gh-85934: Use getattr_static when adding mock spec (#22209)
melanie witt committed
April 13, 2023
January 7, 2023
N
gh-96127: Fix `inspect.signature` call on mocks (#96335)
Nikita Sobolev committed
N
gh-100690: [mock] hide `ATTRIB_DENY_LIST` and make it immutable (#100819)
Nikita Sobolev committed
January 6, 2023
C
gh-100690: Raise an AttributeError when the assert_ prefix is forgotten when using Mock (#100691)
Christian Klein committed
January 4, 2023
C
gh-100739: Respect mock spec when checking for unsafe prefixes (#100740)
Christian Klein committed
December 24, 2022
S
gh-100287: Fix unittest.mock.seal with AsyncMock (#100496)
Shantanu committed
December 23, 2022
C
gh-83076: 3.8x speed improvement in (Async)Mock instantiation (#100252)
Carl Meyer committed
November 11, 2022
N
gh-98086: Now ``patch.dict`` can decorate async functions (#98095)
Nikita Sobolev committed
November 7, 2022
A
gh-91803: Mock - fix error when using autospec methods with seal (#92213)
andrei kulakov committed
October 28, 2022
N
gh-98624 Add mutex to unittest.mock.NonCallableMock (#98688)
noah-weingarden committed
June 30, 2022
M
gh-84753: Make inspect.iscoroutinefunction() work with AsyncMock (#94050)
Mehdi ABAAKOUK committed
February 25, 2022
V
bpo-46852: Remove the float.__set_format__() method (GH-31585)
Victor Stinner committed
February 3, 2022
M
Restrict use of Mock objects as specs (GH-31090)
Matthew Suozzo committed
January 23, 2022
I
bpo-41403: Improve error message for invalid mock target (GH-30833)
Irit Katriel committed
September 14, 2021
N
bpo-45156: Fixes inifite loop on unittest.mock.seal() (GH-28300)
Nikita Sobolev committed
August 26, 2021
S
bpo-45010: Remove support of special method __div__ in unittest.mock (GH-27965)
Serhiy Storchaka committed
July 21, 2021
T
bpo-44686 replace unittest.mock._importer with pkgutil.resolve_name (GH-18544)
Thomas Grainger committed
July 5, 2021
J
bpo-44534: fix wording and docstring sync in unittest.Mock GH27000
Jack DeVries committed
June 13, 2021
B
Fix typos in multiple files (GH-26689)
Binbin committed
April 10, 2021
M
bpo-43478: Restrict use of Mock objects as specs (GH-25326)
Matthew Suozzo committed