Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. ↵ | Miss Islington (bot) | 2017-10-18 | 1 | -2/+3 |
| | | | | | | | (GH-3998) (GH-4039) The word "difference" from missing the sentence. This clarifies that it compares the difference between the two objects. (cherry picked from commit 032a6480e360427d4f964e31643604fad804ea14) | ||||
* | [3.6] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin ↵ | Berker Peksag | 2017-07-21 | 2 | -1/+16 |
| | | | | | | | | | | | | | | | | | | | | | functions (GH-3) Cython will, in the right circumstances, offer a MethodType instance where im_func is a builtin function. Any instance of MethodType is automatically assumed to be a Python-defined function (more specifically, a function that has an inspectable signature), but _set_signature was still conservative in its assumptions. As a result _set_signature would return early with None instead of a mock since the im_func had no inspectable signature. This causes problems deeper inside mock, as _set_signature is assumed to _always_ return a mock, and nothing checked its return value. In similar corner cases, autospec will simply not check the spec of the function, so _set_signature is amended to now return early with the original, not-wrapped mock object. Patch by Aaron Gallagher. (cherry picked from commit 856cbcc12f2e4cca93af5dc7ed6bcea4dd942f10) | ||||
* | bpo-30813: Fix unittest when hunting refleaks (#2502) (#2505) | Victor Stinner | 2017-06-30 | 1 | -0/+6 |
| | | | | | | | bpo-11798, bpo-16662, bpo-16935, bpo-30813: Skip test_discover_with_module_that_raises_SkipTest_on_import() and test_discover_with_init_module_that_raises_SkipTest_on_import() of test_unittest when hunting reference leaks using regrtest. (cherry picked from commit e4f9a2d2be42d5a2cdd624f8ed7cdf5028c5fbc3) | ||||
* | bpo-23890: Fix ref cycle in TestCase.assertRaises (#858) | Victor Stinner | 2017-06-15 | 2 | -22/+43 |
| | | | | | unittest.TestCase.assertRaises() now manually breaks a reference cycle to not keep objects alive longer than expected. (cherry picked from commit bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5) | ||||
* | bpo-30078: Add an example of passing a path to unittest (GH-1178) | Berker Peksag | 2017-04-20 | 1 | -0/+1 |
| | | | (cherry picked from commit f7e62cf8adfb8ab6a6a870903defe8ff218a0383) | ||||
* | bpo-28961: Address my comments from earlier code review (#306) | Berker Peksag | 2017-02-26 | 1 | -12/+3 |
| | | | (cherry picked from commit dea1536fd3a8424d537794cd53715df0989cbbe1) | ||||
* | bpo-28911: Clarify the behaviour of assert_called_once_with. (#252) | Arne de Laat | 2017-02-23 | 1 | -2/+2 |
| | | | (cherry picked from commit 9d56b34af2efc4e266bf3ae62da5cd2e422a42be) | ||||
* | Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY. | Serhiy Storchaka | 2017-01-21 | 2 | -5/+20 |
|\ | |||||
| * | Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY. | Serhiy Storchaka | 2017-01-21 | 2 | -5/+20 |
| | | |||||
* | | Issue 29274: Merge doc fixes from 3.5 | Martin Panter | 2017-01-18 | 2 | -8/+8 |
|\ \ | |/ | |||||
| * | Issue #29274: tests cases → test cases | Martin Panter | 2017-01-18 | 2 | -8/+8 |
| | | |||||
* | | Fix unittest.mock._Call: don't ignore name | Victor Stinner | 2017-01-06 | 2 | -2/+15 |
| | | | | | | | | | | | | | | Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter anymore. Patch written by Jiajun Huang. | ||||
* | | Fixes issue28380: unittest.mock Mock autospec functions now properly support | Gregory P. Smith | 2016-10-06 | 2 | -0/+15 |
| | | | | | | | | assert_called, assert_not_called, and assert_called_once. | ||||
* | | Issue #28303: Merge from 3.5 | Berker Peksag | 2016-09-28 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #28303: Fix grammar in unittest.__doc__, patch by Shlomi Fish | Berker Peksag | 2016-09-28 | 1 | -1/+1 |
| | | |||||
* | | Issue #25651: Merge from 3.5 | Berker Peksag | 2016-09-21 | 2 | -2/+13 |
|\ \ | |/ | |||||
| * | Issue #25651: Allow falsy values to be used for msg parameter of subTest() | Berker Peksag | 2016-09-21 | 2 | -2/+13 |
| | | |||||
| * | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Martin Panter | 2016-09-07 | 2 | -2/+2 |
| | | |||||
* | | #27364: fix "incorrect" uses of escape character in the stdlib. | R David Murray | 2016-09-08 | 3 | -14/+14 |
| | | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter. | ||||
* | | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Raymond Hettinger | 2016-08-30 | 2 | -2/+2 |
| | | |||||
* | | Merge | Raymond Hettinger | 2016-08-26 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue 19504: Change "customise" to "customize" American spelling. | Raymond Hettinger | 2016-08-26 | 1 | -1/+1 |
| | | |||||
* | | Issue #26750: use inspect.isdatadescriptor instead of our own | Gregory P. Smith | 2016-08-16 | 1 | -7/+1 |
|\ \ | |/ | | | | | _is_data_descriptor(). | ||||
| * | Issue #26750: use inspect.isdatadescriptor instead of our own | Gregory P. Smith | 2016-08-16 | 1 | -7/+1 |
| | | | | | | | | _is_data_descriptor(). | ||||
* | | Issue #26750: unittest.mock.create_autospec() now works properly for | Gregory P. Smith | 2016-08-07 | 2 | -30/+44 |
|\ \ | |/ | | | | | | | subclasses of property() and other data descriptors. Removes the never publicly used, never documented unittest.mock.DescriptorTypes tuple. | ||||
| * | Issue #26750: unittest.mock.create_autospec() now works properly | Gregory P. Smith | 2016-08-07 | 2 | -22/+48 |
| | | | | | | | | for subclasses of property() and other data descriptors. | ||||
* | | Issue #27626: Merge spelling fixes from 3.5 | Martin Panter | 2016-07-28 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue #27626: Spelling fixes in docs, comments and internal names | Martin Panter | 2016-07-28 | 1 | -2/+2 |
| | | | | | | | | Based on patch by Ville Skyttä. | ||||
* | | Issue #23804: Merge spelling and NEWS fixes from 3.5 | Martin Panter | 2016-07-11 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | English spelling and grammar fixes | Martin Panter | 2016-07-11 | 1 | -1/+1 |
| | | |||||
* | | Issue #27430: Merge from 3.5 | Berker Peksag | 2016-07-01 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #27430: Fix typos, patch by scop. | Berker Peksag | 2016-07-01 | 1 | -1/+1 |
| | | |||||
* | | Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes. | Serhiy Storchaka | 2016-06-19 | 1 | -0/+1 |
|\ \ | |/ | |||||
| * | Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes. | Serhiy Storchaka | 2016-06-19 | 1 | -0/+1 |
| | | |||||
* | | Issue #21271: Adds new keyword only parameters in reset_mock call | Kushal Das | 2016-06-02 | 2 | -1/+24 |
| | | | | | | | | | | We now have two keyword only parameters in the reset_mock function to selectively reset the return_value or the side_effects, or both. | ||||
* | | Issue #27171: Merge typo fixes from 3.5 | Martin Panter | 2016-06-02 | 1 | -1/+1 |
|\ \ | |/ | |||||
| * | Issue #27171: Fix typos in documentation, comments, and test function names | Martin Panter | 2016-06-02 | 1 | -1/+1 |
| | | |||||
* | | Issue #27076: Merge spelling from 3.5 | Martin Panter | 2016-05-26 | 2 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue #27076: Doc, comment and tests spelling fixes | Martin Panter | 2016-05-26 | 2 | -2/+2 |
| | | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä. | ||||
* | | Issue #27063: Some unittest loader tests were silently skipped. | Serhiy Storchaka | 2016-05-20 | 1 | -26/+28 |
|\ \ | |/ | |||||
| * | Issue #27063: Some unittest loader tests were silently skipped. | Serhiy Storchaka | 2016-05-20 | 1 | -26/+28 |
| | | |||||
* | | Issue #26807: mock_open 'files' no longer error on readline at end of file. | Robert Collins | 2016-05-16 | 2 | -0/+14 |
|\ \ | |/ | | | | | Patch from Yolanda Robla. | ||||
| * | Issue #26807: mock_open 'files' no longer error on readline at end of file. | Robert Collins | 2016-05-16 | 2 | -0/+14 |
| | | | | | | | | Patch from Yolanda Robla. | ||||
* | | Merge 3.5 | Serhiy Storchaka | 2016-04-25 | 2 | -3/+79 |
|\ \ | |/ | |||||
| * | Issue #26837: assertSequenceEqual() now correctly outputs non-stringified | Serhiy Storchaka | 2016-04-25 | 2 | -3/+79 |
| | | | | | | | | | | differing items (like bytes in the -b mode). This affects assertListEqual() and assertTupleEqual(). | ||||
* | | Issue #23277: Remove unused imports in tests. | Serhiy Storchaka | 2016-04-24 | 2 | -3/+2 |
| | | |||||
* | | Issue #23277: Remove unused sys and os imports | Berker Peksag | 2016-04-24 | 1 | -2/+0 |
| | | | | | | | | Patch by Jon Dufresne. | ||||
* | | Merge 3.5 (test_unittest) | Victor Stinner | 2016-03-29 | 1 | -3/+6 |
|\ \ | |/ | |||||
| * | Fix ResourceWarning in test_unittest when interrupted | Victor Stinner | 2016-03-29 | 1 | -3/+6 |
| | | |||||
* | | Issue #25195: Fix a regression in mock.MagicMock | Berker Peksag | 2016-03-27 | 2 | -0/+20 |
|\ \ | |/ | | | | | | | | | | | _Call is a subclass of tuple (changeset 3603bae63c13 only works for classes) so we need to implement __ne__ ourselves. Patch by Andrew Plummer. |