Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | [3.5] bpo-29403: Fix mock's broken autospec behavior on method-bound builtin ↵ | Berker Peksag | 2017-07-21 | 1 | -0/+15 |
| | | | | | | | | | | | | | | | | | | | | | 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) (#2506) | 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) | ||||
* | Fix ref cycles in TestCase.assertRaises() (#193) (#2228) | Victor Stinner | 2017-06-15 | 1 | -0/+13 |
| | | | | | bpo-23890: unittest.TestCase.assertRaises() now manually breaks a reference cycle to not keep objects alive longer than expected. (cherry picked from commit bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5) | ||||
* | Fix unittest.mock._Call: don't ignore name (#307) | Berker Peksag | 2017-02-26 | 1 | -0/+5 |
| | | | | | | | | | | | | | Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter anymore. Patch written by Jiajun Huang. (cherry picked from commits 84b6fb0eea29b3b28a1a11124526b01ec0c9d17a and dea1536fd3a8424d537794cd53715df0989cbbe1) Conflicts: Misc/NEWS | ||||
* | Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY. | Serhiy Storchaka | 2017-01-21 | 1 | -3/+14 |
| | |||||
* | Issue #29274: tests cases → test cases | Martin Panter | 2017-01-18 | 1 | -4/+4 |
| | |||||
* | Issue #25651: Allow falsy values to be used for msg parameter of subTest() | Berker Peksag | 2016-09-21 | 1 | -0/+10 |
| | |||||
* | Issue #27895: Spelling fixes (Contributed by Ville Skyttä). | Martin Panter | 2016-09-07 | 2 | -2/+2 |
| | |||||
* | Issue 19504: Change "customise" to "customize" American spelling. | Raymond Hettinger | 2016-08-26 | 1 | -1/+1 |
| | |||||
* | Issue #26750: unittest.mock.create_autospec() now works properly | Gregory P. Smith | 2016-08-07 | 1 | -21/+39 |
| | | | | for subclasses of property() and other data descriptors. | ||||
* | Issue #27430: Fix typos, patch by scop. | Berker Peksag | 2016-07-01 | 1 | -1/+1 |
| | |||||
* | 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 | 1 | -0/+12 |
| | | | | Patch from Yolanda Robla. | ||||
* | Issue #26837: assertSequenceEqual() now correctly outputs non-stringified | Serhiy Storchaka | 2016-04-25 | 1 | -0/+76 |
| | | | | | differing items (like bytes in the -b mode). This affects assertListEqual() and assertTupleEqual(). | ||||
* | 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 | 1 | -0/+17 |
| | | | | | | | _Call is a subclass of tuple (changeset 3603bae63c13 only works for classes) so we need to implement __ne__ ourselves. Patch by Andrew Plummer. | ||||
* | #25320: Handle sockets in directories unittest discovery is scanning. | Robert Collins | 2016-03-15 | 1 | -0/+40 |
| | | | | Patch from Victor van den Elzen. | ||||
* | Issue #22138: Fix mock.patch behavior when patching descriptors. Restore | Senthil Kumaran | 2016-01-09 | 1 | -0/+26 |
| | | | | | | original values after patching. Patch contributed by Sean McCully. | ||||
* | Issue #25523: Further a-to-an corrections new in 3.5 | Martin Panter | 2015-11-02 | 1 | -2/+2 |
| | |||||
* | Issue #24857: Comparing call_args to a long sequence now correctly returns a | Berker Peksag | 2015-09-09 | 1 | -0/+3 |
|\ | | | | | | | | | | | boolean result instead of raising an exception. Patch by A Kaptur. | ||||
| * | Issue #24857: Comparing call_args to a long sequence now correctly returns a | Berker Peksag | 2015-09-09 | 1 | -0/+3 |
| | | | | | | | | | | | | boolean result instead of raising an exception. Patch by A Kaptur. | ||||
* | | Issue #21112: Fix regression in unittest.expectedFailure on subclasses. | Robert Collins | 2015-08-27 | 1 | -0/+33 |
|\ \ | |/ | | | | | Patch from Berker Peksag. | ||||
| * | Issue #21112: Fix regression in unittest.expectedFailure on subclasses. | Robert Collins | 2015-08-27 | 1 | -0/+33 |
| | | | | | | | | Patch from Berker Peksag. | ||||
* | | Issue #20362: Honour TestCase.longMessage correctly in assertRegex. | Robert Collins | 2015-08-19 | 1 | -1/+14 |
| | | | | | | | | Patch from Ilia Kurenkov. | ||||
* | | Issue #23004: mock_open() now reads binary data correctly when the type of ↵ | Berker Peksag | 2015-08-06 | 1 | -0/+28 |
|\ \ | |/ | | | | | | | | | read_data is bytes. Initial patch by Aaron Hill. | ||||
| * | Issue #23004: mock_open() now reads binary data correctly when the type of ↵ | Berker Peksag | 2015-08-06 | 1 | -0/+28 |
| | | | | | | | | | | | | read_data is bytes. Initial patch by Aaron Hill. | ||||
* | | Issue #21750: Further fixup to be styled like other mock APIs. | Robert Collins | 2015-07-23 | 2 | -3/+25 |
|\ \ | |/ | |||||
| * | Issue #21750: Further fixup to be styled like other mock APIs. | Robert Collins | 2015-07-23 | 2 | -3/+25 |
| | | |||||
* | | Issue #21750: mock_open.read_data can now be read from each instance, as it | Robert Collins | 2015-07-17 | 2 | -2/+21 |
|\ \ | |/ | | | | | could in Python 3.3. | ||||
| * | Issue #21750: mock_open.read_data can now be read from each instance, as it | Robert Collins | 2015-07-17 | 2 | -2/+21 |
| | | | | | | | | could in Python 3.3. | ||||
* | | - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely. | Robert Collins | 2015-07-14 | 1 | -0/+3 |
|\ \ | |/ | | | | | Patch from Nicola Palumbo and Laurent De Buyst. | ||||
| * | - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely. | Robert Collins | 2015-07-14 | 1 | -0/+3 |
| | | | | | | | | Patch from Nicola Palumbo and Laurent De Buyst. | ||||
| * | Reverted issue #24134 changes (except new tests). | Serhiy Storchaka | 2015-05-16 | 1 | -11/+0 |
| | | |||||
* | | Issue #23661: unittest.mock side_effects can now be exceptions again. | Robert Collins | 2015-07-14 | 1 | -0/+9 |
| | | | | | | | | This was a regression vs Python 3.4. Patch from Ignacio Rossi | ||||
* | | Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() and | Serhiy Storchaka | 2015-05-21 | 1 | -0/+56 |
| | | | | | | | | | | assertWarnsRegex() assertments now check the type of the first argument to prevent possible user error. Based on patch by Daniel Wagner-Hall. | ||||
* | | Issue #24245: Eliminated senseless expect clauses that have no any effect. | Serhiy Storchaka | 2015-05-20 | 1 | -4/+0 |
| | | | | | | | | Patch by Martin Panter. | ||||
* | | Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() and | Serhiy Storchaka | 2015-05-16 | 1 | -4/+40 |
| | | | | | | | | | | assertWarnsRegex() checks now emits a deprecation warning when callable is None or keyword arguments except msg is passed in the context manager mode. | ||||
* | | Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() and | Serhiy Storchaka | 2015-05-06 | 1 | -0/+52 |
|\ \ | |/ | | | | | | | | | assertWarnsRegex() checks are not longer successful if the callable is None. Added tests for assertRaises(). | ||||
| * | Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() and | Serhiy Storchaka | 2015-05-06 | 1 | -0/+52 |
| | | | | | | | | | | | | assertWarnsRegex() checks are not longer successful if the callable is None. Added tests for assertRaises(). | ||||
| * | Issue #23310: Fix MagicMock's initializer to work with __methods__. | Łukasz Langa | 2015-04-14 | 1 | -0/+15 |
| | | | | | | | | Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim. | ||||
* | | Issue #23310: Fix MagicMock's initializer to work with __methods__. | Łukasz Langa | 2015-04-14 | 1 | -0/+15 |
| | | | | | | | | Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim. | ||||
* | | Issue #22903: The fake test case created by unittest.loader when it fails ↵ | Antoine Pitrou | 2015-03-18 | 1 | -0/+13 |
|\ \ | |/ | | | | | importing a test module is now picklable. | ||||
| * | Issue #22903: The fake test case created by unittest.loader when it fails ↵ | Antoine Pitrou | 2015-03-18 | 1 | -0/+9 |
| | | | | | | | | importing a test module is now picklable. | ||||
* | | Issue #23568: Add rdivmod support to MagicMock() objects. | Berker Peksag | 2015-03-14 | 1 | -0/+15 |
|\ \ | |/ | | | | | Patch by Håkan Lövdahl. | ||||
| * | Issue #23568: Add rdivmod support to MagicMock() objects. | Berker Peksag | 2015-03-14 | 1 | -0/+15 |
| | | | | | | | | Patch by Håkan Lövdahl. | ||||
* | | Issue #23581: Add matmul support to MagicMock. | Berker Peksag | 2015-03-12 | 1 | -0/+11 |
| | | | | | | | | Patch by Håkan Lövdahl. | ||||
* | | Issue #22936: Allow showing local variables in unittest errors. | Robert Collins | 2015-03-06 | 4 | -16/+66 |
| | | |||||
* | | Issue #22894: TestCase.subTest() would cause the test suite to be stopped ↵ | Antoine Pitrou | 2014-11-23 | 1 | -0/+28 |
|\ \ | |/ | | | | | when in failfast mode, even in the absence of failures. | ||||
| * | Issue #22894: TestCase.subTest() would cause the test suite to be stopped ↵ | Antoine Pitrou | 2014-11-23 | 1 | -0/+28 |
| | | | | | | | | when in failfast mode, even in the absence of failures. | ||||
* | | Close #22457: Honour load_tests in the start_dir of discovery. | Robert Collins | 2014-11-04 | 2 | -1/+46 |
| | | | | | | | | | | | | We were not honouring load_tests in a package/__init__.py when that was the start_dir parameter, though we do when it is a child package. The fix required a little care since it introduces the possibility of infinite recursion. |