Commit Graph

17 Commits

Author SHA1 Message Date
Michael Foord 04cbe0c35b Closes issue 17467. Add readline and readlines support to unittest.mock.mock_open 2013-03-19 17:22:51 -07:00
Antoine Pitrou 5c64df70b5 Issue #17015: When it has a spec, a Mock object now inspects its signature when matching calls, so that arguments can be matched positionally or by name. 2013-02-03 00:23:58 +01:00
Michael Foord 28d591ceef Closes issue 15323. Improve failure message of Mock.assert_called_once_with 2012-09-28 16:15:22 +01:00
Michael Foord f7c4158057 Adding patch.stopall method to unittest.mock 2012-06-10 20:36:32 +01:00
Michael Foord 75963643b1 Fix exception when calling reset_mock on a mock created with autospec 2012-06-09 17:31:59 +01:00
Michael Foord 3af125a4aa Closes issue 14634. unittest.mock.create_autospec now supports keyword only arguments. 2012-04-21 18:22:28 +01:00
Michael Foord 2cd48738ba Closes issue 14636. mock objects raise exceptions from an iterable side_effect 2012-04-21 15:52:11 +01:00
Michael Foord 656319e58d Make unittest.mock.create_autospec resilient against AttributeError on original object 2012-04-13 17:39:16 +01:00
Michael Foord c287062fcf unittest.mock.PropertyMock return value and attributes are now standard MagicMocks 2012-04-13 16:57:22 +01:00
Michael Foord e58a562d93 unittest.mock: a mock created by patch with a spec as the list argument will be callable if __call__ is in the spec 2012-03-25 19:53:18 +01:00
Michael Foord 50a8c0ef5d Support subclassing unittest.mock._patch and fix various obscure bugs around patcher spec arguments 2012-03-25 18:57:58 +01:00
Michael Foord 313f85f0ca unittest.mock.MagicMock objects are now unorderable by default 2012-03-25 18:16:07 +01:00
Michael Foord a74b3aa0cc Remove more Python 2 compatibility cruft from unittest.mock 2012-03-14 14:40:22 -07:00
Michael Foord ebff097937 And another one... mock import fix. 2012-03-14 13:01:31 -07:00
Michael Foord 83a16856ee Fix another mock import 2012-03-14 12:58:46 -07:00
Michael Foord 0ca9acd1dd Fix import failure in mock test 2012-03-14 12:38:06 -07:00
Michael Foord 345266aa7e PEP 417: Adding unittest.mock 2012-03-14 12:24:34 -07:00