blob: 2e13b8a04ee1cd71150a8a52de3d16cf305ebe74 [file] [log] [blame]
Robert Collins4292afa2015-07-24 03:48:20 +12001Library
2-------
3
Senthil Kumaran4deb2c12016-01-08 23:43:29 -08004- Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
5 original values after patching. Patch contributed by Sean McCully.
6
Berker Peksagf40c6602015-09-09 23:35:25 +03007- Issue #24857: Comparing call_args to a long sequence now correctly returns a
8 boolean result instead of raising an exception. Patch by A Kaptur.
9
Berker Peksag5efb4e52015-08-06 13:15:51 +030010- Issue #23004: mock_open() now reads binary data correctly when the type of
11 read_data is bytes. Initial patch by Aaron Hill.
12
Robert Collins4292afa2015-07-24 03:48:20 +120013- Issue #21750: mock_open.read_data can now be read from each instance, as it
14 could in Python 3.3.
15
Robert Collins5c57dd22015-07-15 11:42:28 +120016- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
17 Patch from Nicola Palumbo and Laurent De Buyst.
18
Robert Collins19d5a002015-07-14 13:51:40 +120019- Issue #23661: unittest.mock side_effects can now be exceptions again. This
20 was a regression vs Python 3.4. Patch from Ignacio Rossi
21
Łukasz Langaf31b1762015-04-13 23:12:42 -070022- Issue #23310: Fix MagicMock's initializer to work with __methods__, just
23 like configure_mock(). Patch by Kasia Jachim.
24
Berker Peksagfb2f1f52015-03-15 01:51:56 +020025- Issue #23568: Add rdivmod support to MagicMock() objects.
26 Patch by Håkan Lövdahl.
27
Berker Peksage3d21b42015-03-12 20:42:48 +020028- Issue #23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl.
29
Serhiy Storchaka6af6ddc2015-01-31 12:05:05 +020030- Issue #23326: Removed __ne__ implementations. Since fixing default __ne__
Robert Collins18c9bbd2015-07-10 14:00:11 +120031 implementation in issue #21408 they are redundant. *** NOT BACKPORTED ***
Serhiy Storchaka6af6ddc2015-01-31 12:05:05 +020032
Kushal Dasb4c7f7e2014-09-16 18:33:37 +053033- Issue #21270: We now override tuple methods in mock.call objects so that
34 they can be used as normal call attributes.
35
Kushal Dase9f77562014-06-09 13:45:56 +053036- Issue #21256: Printout of keyword args should be in deterministic order in
37 a mock function call. This will help to write better doctests.
38
Kushal Dasc7d6c7d2014-04-17 01:36:14 +053039- Issue #21262: New method assert_not_called for Mock.
40 It raises AssertionError if the mock has been called.
41
Kushal Das7c530f02014-04-16 23:32:21 +053042- Issue #21238: New keyword argument `unsafe` to Mock. It raises
43 `AttributeError` incase of an attribute startswith assert or assret.
44
Michael Foordba2e4072014-04-15 17:21:08 -040045- Issue #21239: patch.stopall() didn't work deterministically when the same
46 name was patched more than once.
47
Kushal Dasd3135cf2014-04-16 01:05:50 +053048- Issue #21222: Passing name keyword argument to mock.create_autospec now
49 works.
50
Michael Foord6df8ab62014-04-14 16:09:42 -040051- Issue #17826: setting an iterable side_effect on a mock function created by
52 create_autospec now works. Patch by Kushal Das.
53
Michael Foord936fabd2014-04-14 16:25:20 -040054- Issue #17826: setting an iterable side_effect on a mock function created by
55 create_autospec now works. Patch by Kushal Das.
56
Michael Foorddfeef202014-04-14 11:23:48 -040057- Issue #20968: unittest.mock.MagicMock now supports division.
58 Patch by Johannes Baiter.
59
Larry Hastingsb9d1edb2014-01-24 06:17:25 -080060- Issue #20189: unittest.mock now no longer assumes that any object for
61 which it could get an inspect.Signature is a callable written in Python.
62 Fix courtesy of Michael Foord.
63
Michael Foorda98a5ba2013-03-19 17:22:51 -070064- Issue #17467: add readline and readlines support to mock_open in
65 unittest.mock.
66
Antoine Pitroueba505c2013-02-03 00:23:58 +010067- Issue #17015: When it has a spec, a Mock object now inspects its signature
68 when matching calls, so that arguments can be matched positionally or
69 by name.
70
Michael Foord7ea94082012-09-28 16:15:22 +010071- Issue #15323: improve failure message of Mock.assert_called_once_with
72
Nick Coghlandfb22112012-05-27 18:17:07 +100073- Issue #14857: fix regression in references to PEP 3135 implicit __class__
74 closure variable (Reopens issue #12370)
75
Michael Foordac60cfa2012-03-25 18:16:07 +010076- Issue #14295: Add unittest.mock