summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
Commit message (Collapse)AuthorAgeFilesLines
* Spelling fixes (#2902)Ville Skyttä2017-08-031-1/+1
|
* bpo-29403: Fix mock's broken autospec behavior on method-bound builtin ↵Aaron Gallagher2017-07-202-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.
* bpo-30813: Fix unittest when hunting refleaks (#2502)Victor Stinner2017-06-301-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.
* bpo-30664: The description of a unittest subtest now preserves the (#2265)Serhiy Storchaka2017-06-232-7/+26
| | | | order of keyword arguments of TestCase.subTest().
* #30190: fix invalid escape sequence warnings (#1534)Giampaolo Rodola2017-05-101-3/+3
|
* bpo-30190: improved error msg for assertAlmostEqual(delta=...) (#1331)Giampaolo Rodola2017-05-012-17/+26
| | | | | | | | | | | | * #30190 / unittest / assertAlmostEqual(delta=...) / error msg: show the difference between the 2 numbers in case of failure * safe_repr() diff * also show difference when passing 'places' argument * refactoring * update Misc/NEWS
* bpo-30078: Add an example of passing a path to unittest (#1178)Louie Lu2017-04-201-0/+1
|
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-2/+2
|
* Fix ref cycles in TestCase.assertRaises() (#193)Victor Stinner2017-03-272-22/+43
| | | | bpo-23890: unittest.TestCase.assertRaises() now manually breaks a reference cycle to not keep objects alive longer than expected.
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+1
| | | Make also minor PEP8 coding style fixes on modified imports.
* bpo-28961: Address my comments from earlier code review (#305)Berker Peksag2017-02-261-12/+3
|
* bpo-28911: Clarify the behaviour of assert_called_once_with. (#251)Arne de Laat2017-02-231-2/+2
|
* Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-212-5/+20
|\
| * Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-212-5/+20
| |\
| | * Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-212-5/+20
| | |
* | | Issue 29274: Merge doc fixes from 3.6Martin Panter2017-01-182-8/+8
|\ \ \ | |/ /
| * | Issue 29274: Merge doc fixes from 3.5Martin Panter2017-01-182-8/+8
| |\ \ | | |/
| | * Issue #29274: tests cases → test casesMartin Panter2017-01-182-8/+8
| | |
* | | Issue #20804: The unittest.mock.sentinel attributes now preserve theirSerhiy Storchaka2017-01-112-0/+19
| | | | | | | | | | | | identity when they are copied or pickled.
* | | Merge 3.6Victor Stinner2017-01-062-2/+15
|\ \ \ | |/ /
| * | Fix unittest.mock._Call: don't ignore nameVictor Stinner2017-01-062-2/+15
| | | | | | | | | | | | | | | | | | | | | Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter anymore. Patch written by Jiajun Huang.
* | | Issue #28919: Simplify _copy_func_details() in unittest.mockBerker Peksag2016-12-151-18/+8
|/ / | | | | | | Patch by Jiajun Huang.
* | Fixes issue28380: unittest.mock Mock autospec functions now properly supportGregory P. Smith2016-10-062-0/+15
| | | | | | | | assert_called, assert_not_called, and assert_called_once.
* | Issue #28303: Merge from 3.5Berker Peksag2016-09-281-1/+1
|\ \ | |/
| * Issue #28303: Fix grammar in unittest.__doc__, patch by Shlomi FishBerker Peksag2016-09-281-1/+1
| |
* | Issue #25651: Merge from 3.5Berker Peksag2016-09-212-2/+13
|\ \ | |/
| * Issue #25651: Allow falsy values to be used for msg parameter of subTest()Berker Peksag2016-09-212-2/+13
| |
| * Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-072-2/+2
| |
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-083-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 Hettinger2016-08-302-2/+2
| |
* | MergeRaymond Hettinger2016-08-261-1/+1
|\ \ | |/
| * Issue 19504: Change "customise" to "customize" American spelling.Raymond Hettinger2016-08-261-1/+1
| |
* | Issue #26750: use inspect.isdatadescriptor instead of our ownGregory P. Smith2016-08-161-7/+1
|\ \ | |/ | | | | _is_data_descriptor().
| * Issue #26750: use inspect.isdatadescriptor instead of our ownGregory P. Smith2016-08-161-7/+1
| | | | | | | | _is_data_descriptor().
* | Issue #26750: unittest.mock.create_autospec() now works properly forGregory P. Smith2016-08-072-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 properlyGregory P. Smith2016-08-072-22/+48
| | | | | | | | for subclasses of property() and other data descriptors.
* | Issue #27626: Merge spelling fixes from 3.5Martin Panter2016-07-281-2/+2
|\ \ | |/
| * Issue #27626: Spelling fixes in docs, comments and internal namesMartin Panter2016-07-281-2/+2
| | | | | | | | Based on patch by Ville Skyttä.
* | Issue #23804: Merge spelling and NEWS fixes from 3.5Martin Panter2016-07-111-1/+1
|\ \ | |/
| * English spelling and grammar fixesMartin Panter2016-07-111-1/+1
| |
* | Issue #27430: Merge from 3.5Berker Peksag2016-07-011-1/+1
|\ \ | |/
| * Issue #27430: Fix typos, patch by scop.Berker Peksag2016-07-011-1/+1
| |
* | Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes.Serhiy Storchaka2016-06-191-0/+1
|\ \ | |/
| * Issue #23641: Added __getnewargs_ex__ to the list of special mock attributes.Serhiy Storchaka2016-06-191-0/+1
| |
* | Issue #21271: Adds new keyword only parameters in reset_mock callKushal Das2016-06-022-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.5Martin Panter2016-06-021-1/+1
|\ \ | |/
| * Issue #27171: Fix typos in documentation, comments, and test function namesMartin Panter2016-06-021-1/+1
| |
* | Issue #27076: Merge spelling from 3.5Martin Panter2016-05-262-2/+2
|\ \ | |/
| * Issue #27076: Doc, comment and tests spelling fixesMartin Panter2016-05-262-2/+2
| | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* | Issue #27063: Some unittest loader tests were silently skipped.Serhiy Storchaka2016-05-201-26/+28
|\ \ | |/