Commit Graph

358 Commits

Author SHA1 Message Date
Gregory P. Smith ac5084b6c7 Fixes issue28380: unittest.mock Mock autospec functions now properly support
assert_called, assert_not_called, and assert_called_once.
2016-10-06 14:31:23 -07:00
Berker Peksag eadf443e9a Issue #28303: Merge from 3.5 2016-09-28 17:29:12 +03:00
Berker Peksag aa5c2fdb7c Issue #28303: Fix grammar in unittest.__doc__, patch by Shlomi Fish 2016-09-28 17:28:41 +03:00
Berker Peksag b3d4e7fe71 Issue #25651: Merge from 3.5 2016-09-21 19:35:28 +03:00
Berker Peksag 16ea19fc66 Issue #25651: Allow falsy values to be used for msg parameter of subTest() 2016-09-21 19:34:15 +03:00
Martin Panter 0be894b2f6 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
R David Murray 44b548dda8 #27364: fix "incorrect" uses of escape character in the stdlib.
And most of the tools.

Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
2016-09-08 13:59:53 -04:00
Raymond Hettinger 15f44ab043 Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-08-30 10:47:49 -07:00
Raymond Hettinger f74c33ad5c Merge 2016-08-25 21:12:16 -07:00
Raymond Hettinger 7ea386e56e Issue 19504: Change "customise" to "customize" American spelling. 2016-08-25 21:11:50 -07:00
Gregory P. Smith c35a32fe85 Issue #26750: use inspect.isdatadescriptor instead of our own
_is_data_descriptor().
2016-08-15 23:56:32 -07:00
Gregory P. Smith d4583d7fea Issue #26750: use inspect.isdatadescriptor instead of our own
_is_data_descriptor().
2016-08-15 23:23:40 -07:00
Gregory P. Smith d0d24fd1ae Issue #26750: unittest.mock.create_autospec() now works properly for
subclasses of property() and other data descriptors.  Removes the never
publicly used, never documented unittest.mock.DescriptorTypes tuple.
2016-08-07 09:06:27 -07:00
Gregory P. Smith 9854789efe Issue #26750: unittest.mock.create_autospec() now works properly
for subclasses of property() and other data descriptors.
2016-08-07 08:52:26 -07:00
Martin Panter 8bde911115 Issue #27626: Merge spelling fixes from 3.5 2016-07-28 01:30:58 +00:00
Martin Panter eb9957065a Issue #27626: Spelling fixes in docs, comments and internal names
Based on patch by Ville Skyttä.
2016-07-28 01:11:04 +00:00
Martin Panter 702f4f5d6f Issue #23804: Merge spelling and NEWS fixes from 3.5 2016-07-11 12:54:44 +00:00
Martin Panter 204bf0b9ae English spelling and grammar fixes 2016-07-11 07:51:37 +00:00
Berker Peksag a9e1ebb780 Issue #27430: Merge from 3.5 2016-07-01 12:17:45 +03:00
Berker Peksag e39682b076 Issue #27430: Fix typos, patch by scop. 2016-07-01 12:17:05 +03:00
Serhiy Storchaka 6c85091b5b Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes. 2016-06-19 18:32:07 +03:00
Serhiy Storchaka 5943ea76d5 Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes. 2016-06-19 18:30:43 +03:00
Kushal Das 9cd39a170b Issue #21271: Adds new keyword only parameters in reset_mock call
We now have two keyword only parameters in the reset_mock function to
selectively reset the return_value or the side_effects, or both.
2016-06-02 10:20:16 -07:00
Martin Panter 0b7d84de6b Issue #27171: Merge typo fixes from 3.5 2016-06-02 10:11:18 +00:00
Martin Panter e26da7c03a Issue #27171: Fix typos in documentation, comments, and test function names 2016-06-02 10:07:09 +00:00
Martin Panter 3e04d5b306 Issue #27076: Merge spelling from 3.5 2016-05-26 06:03:19 +00:00
Martin Panter 46f50726a0 Issue #27076: Doc, comment and tests spelling fixes
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
2016-05-26 05:35:26 +00:00
Serhiy Storchaka 742206d95c Issue #27063: Some unittest loader tests were silently skipped. 2016-05-20 23:29:07 +03:00
Serhiy Storchaka 0dad755600 Issue #27063: Some unittest loader tests were silently skipped. 2016-05-20 23:28:37 +03:00
Robert Collins c85dd85f1a Issue #26807: mock_open 'files' no longer error on readline at end of file.
Patch from Yolanda Robla.
2016-05-16 15:22:45 +12:00
Robert Collins 9549a3e3d4 Issue #26807: mock_open 'files' no longer error on readline at end of file.
Patch from Yolanda Robla.
2016-05-16 15:22:01 +12:00
Serhiy Storchaka 81e7f94076 Merge 3.5 2016-04-25 08:58:59 +03:00
Serhiy Storchaka 685fbed7f9 Issue #26837: assertSequenceEqual() now correctly outputs non-stringified
differing items (like bytes in the -b mode).  This affects assertListEqual()
and assertTupleEqual().
2016-04-25 08:58:25 +03:00
Serhiy Storchaka e437a10d15 Issue #23277: Remove unused imports in tests. 2016-04-24 21:41:02 +03:00
Berker Peksag 1e8ee9b380 Issue #23277: Remove unused sys and os imports
Patch by Jon Dufresne.
2016-04-24 07:31:42 +03:00
Victor Stinner 6e722bc13f Merge 3.5 (test_unittest) 2016-03-30 01:15:48 +02:00
Victor Stinner 9db2ae7263 Fix ResourceWarning in test_unittest when interrupted 2016-03-30 01:15:28 +02:00
Berker Peksag 5a6c018b57 Issue #25195: Fix a regression in mock.MagicMock
_Call is a subclass of tuple (changeset 3603bae63c13 only works
for classes) so we need to implement __ne__ ourselves.

Patch by Andrew Plummer.
2016-03-28 00:30:40 +03:00
Berker Peksag ce913877e4 Issue #25195: Fix a regression in mock.MagicMock
_Call is a subclass of tuple (changeset 3603bae63c13 only works
for classes) so we need to implement __ne__ ourselves.

Patch by Andrew Plummer.
2016-03-28 00:30:02 +03:00
Robert Collins bfef0be420 #25320: Handle sockets in directories unittest discovery is scanning.
Patch from Victor van den Elzen.
2016-03-15 13:33:28 +13:00
Robert Collins ecd5383891 #25320: Handle sockets in directories unittest discovery is scanning.
Patch from Victor van den Elzen.
2016-03-15 13:29:17 +13:00
Victor Stinner 2c2a4e63d7 Add Mock.assert_called()
Issue #26323: Add assert_called() and assert_called_once() methods to
unittest.mock.Mock.
2016-03-11 22:17:48 +01:00
Brett Cannon 43dab4bfcf Merge 'used with permission' additions 2016-01-15 09:54:16 -08:00
Brett Cannon 07b954d148 Add some "used with permission" mentions where external resources are referenced.
Permission was validated prior to adding these markings.
2016-01-15 09:53:51 -08:00
Senthil Kumaran 121edbf7e2 Issue25347 - Format the error message output of mock's assert_has_calls method.
Patch contributed by Robert Zimmerman.
2016-01-12 06:18:32 -08:00
Senthil Kumaran 81bc927da7 Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
original values after patching.

Patch contributed by Sean McCully.
2016-01-08 23:43:29 -08:00
Martin Panter d2ad5718ad Issue #25523: Further a-to-an corrections new in 3.5 2015-11-02 04:20:33 +00:00
Serhiy Storchaka 153627c111 Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:46:20 +03:00
Serhiy Storchaka 0424eaf753 Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:45:25 +03:00
Berker Peksag 29bf4d403d Issue #24857: Comparing call_args to a long sequence now correctly returns a
boolean result instead of raising an exception.

Patch by A Kaptur.
2015-09-09 23:39:45 +03:00