Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-24412: Adds cleanUps for setUpClass and setUpModule. (GH-9190) | Lisa Roach | 2018-11-09 | 4 | -18/+705 |
| | |||||
* | bpo-35133: Fix mistakes when concatenate string literals on different lines. ↵ | Serhiy Storchaka | 2018-11-05 | 1 | -1/+1 |
| | | | | | | | | | | (GH-10284) Two kind of mistakes: 1. Missed space. After concatenating there is no space between words. 2. Missed comma. Causes unintentional concatenating in a list of strings. | ||||
* | bpo-35047, unittest.mock: Better error messages on assert_called_xxx ↵ | Petter Strandmark | 2018-10-28 | 2 | -8/+58 |
| | | | | | | | failures (GH-10090) unittest.mock now includes mock calls in exception messages if assert_not_called, assert_called_once, or assert_called_once_with fails. | ||||
* | bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960) | Max Bélanger | 2018-10-25 | 2 | -0/+12 |
| | | | | The MagicMock class supports many magic methods, but not __fspath__. To ease testing with modules such as os.path, this function is now supported by default. | ||||
* | unittest.mock doc: Fix references to recursive seal of Mocks (GH-9028) | Mario Corchero | 2018-10-19 | 1 | -5/+4 |
| | | | | | The docs in `library/unittest.mock` have been updated to remove confusing terms about submock and be explicit about the behavior expected. | ||||
* | bpo-34900: Make TestCase.debug() work with subtests (GH-9707) | Bruno Oliveira | 2018-10-12 | 2 | -1/+15 |
| | |||||
* | bpo-32933: Implement __iter__ method on mock_open() (GH-5974) | Tony Flury | 2018-09-12 | 3 | -3/+31 |
| | |||||
* | bpo-34318: Convert deprecation warnings to errors in assertRaises() etc. ↵ | Serhiy Storchaka | 2018-08-19 | 2 | -19/+10 |
| | | | | (GH-8623) | ||||
* | Improve error message when mock.assert_has_calls fails (GH-8205) | davidair | 2018-08-17 | 1 | -1/+3 |
| | | | | | This makes the assertion error message more useful, aiding debugging. Thanks @davidair! | ||||
* | bpo-33746: Fix test_unittest.testRegisterResult() in verbose mode (GH-7799) | Victor Stinner | 2018-06-20 | 1 | -9/+6 |
| | | | | | | | | | | | Only make sure that the result is in unittest.signals._results, don't check the full content of unittest.signals._results. support._run_suite() uses TextTestRunner in verbose mode, but TextTestRunner.run() calls registerResult(result) which made the test fail with "odd object in result set". Call also removeResult() to restore unittest.signals._results to avoid test side effect. | ||||
* | pypi.python.org -> pypi.org (GH-7613) | Ned Deily | 2018-06-11 | 1 | -1/+1 |
| | |||||
* | bpo-33748: fix tests altering sys.path and sys.modules (GH-7433) | Tal Einat | 2018-06-10 | 1 | -19/+20 |
| | |||||
* | bpo-33516: Add support for __round__ in MagicMock (GH-6880) | John Reese | 2018-05-22 | 2 | -1/+6 |
| | | | unittest.mock.MagicMock now supports the __round__() magic method. | ||||
* | bpo-32746: Fix multiple typos (GH-5144) | Leo Arias | 2018-02-04 | 1 | -2/+2 |
| | | | Fix typos found by codespell in docs, docstrings, and comments. | ||||
* | bpo-32360: unittest.util: Use Counter instead of custom count function (GH-4994) | Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) | 2018-01-24 | 1 | -9/+2 |
| | |||||
* | bpo-32593: Drop FreeBSD 9 and older support (#5232) | Victor Stinner | 2018-01-22 | 1 | -8/+0 |
| | | | Drop support of FreeBSD 9 and older. | ||||
* | bpo-32297: Few misspellings found in Python source code comments. (#4803) | Mike | 2017-12-14 | 1 | -1/+1 |
| | | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py | ||||
* | bpo-32230: Set sys.warnoptions with -X dev (#4820) | Victor Stinner | 2017-12-12 | 1 | -1/+1 |
| | | | | | | | | | | | | | | Rather than supporting dev mode directly in the warnings module, this instead adjusts the initialisation code to add an extra 'default' entry to sys.warnoptions when dev mode is enabled. This ensures that dev mode behaves *exactly* as if `-Wdefault` had been passed on the command line, including in the way it interacts with `sys.warnoptions`, and with other command line flags like `-bb`. Fix also bpo-20361: have -b & -bb options take precedence over any other warnings options. Patch written by Nick Coghlan, with minor modifications of Victor Stinner. | ||||
* | bpo-32071: Fix regression and add What's New entry (#4589) | Jonas Haag | 2017-11-28 | 2 | -2/+26 |
| | | | | | | * bpo-32071: Fix an undocumented behaviour regression * bpo-32071: Add 3.7 release note entry for unittest -k | ||||
* | bpo-32071: Add unittest -k option (#4496) | Jonas Haag | 2017-11-25 | 4 | -14/+90 |
| | | | | * bpo-32071: Add unittest -k option | ||||
* | Fix miscellaneous typos (#4275) | luzpaz | 2017-11-05 | 1 | -1/+1 |
| | |||||
* | Update TestCase.assertAlmostEqual and assertNotAlmostEqual docstrings. (GH-3998) | Ron | 2017-10-18 | 1 | -2/+3 |
| | | | | The word "difference" from missing the sentence. This clarifies that it compares the difference between the two objects. | ||||
* | bpo-30541: Add new method to seal mocks (GH61923) | Mario Corchero | 2017-10-17 | 2 | -2/+222 |
| | | | | | | | The new method allows the developer to control when to stop the feature of mocks that automagically creates new mocks when accessing an attribute that was not declared before Signed-off-by: Mario Corchero <mariocj89@gmail.com> | ||||
* | bpo-30397: Add re.Pattern and re.Match. (#1646) | Serhiy Storchaka | 2017-10-04 | 1 | -2/+2 |
| | |||||
* | Spelling fixes (#2902) | Ville Skyttä | 2017-08-03 | 1 | -1/+1 |
| | |||||
* | bpo-29403: Fix mock's broken autospec behavior on method-bound builtin ↵ | Aaron Gallagher | 2017-07-20 | 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. | ||||
* | bpo-30813: Fix unittest when hunting refleaks (#2502) | 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. | ||||
* | bpo-30664: The description of a unittest subtest now preserves the (#2265) | Serhiy Storchaka | 2017-06-23 | 2 | -7/+26 |
| | | | | order of keyword arguments of TestCase.subTest(). | ||||
* | #30190: fix invalid escape sequence warnings (#1534) | Giampaolo Rodola | 2017-05-10 | 1 | -3/+3 |
| | |||||
* | bpo-30190: improved error msg for assertAlmostEqual(delta=...) (#1331) | Giampaolo Rodola | 2017-05-01 | 2 | -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 Lu | 2017-04-20 | 1 | -0/+1 |
| | |||||
* | bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051) | Serhiy Storchaka | 2017-04-16 | 1 | -2/+2 |
| | |||||
* | Fix ref cycles in TestCase.assertRaises() (#193) | Victor Stinner | 2017-03-27 | 2 | -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 Stinner | 2017-03-27 | 1 | -1/+1 |
| | | | Make also minor PEP8 coding style fixes on modified imports. | ||||
* | bpo-28961: Address my comments from earlier code review (#305) | Berker Peksag | 2017-02-26 | 1 | -12/+3 |
| | |||||
* | bpo-28911: Clarify the behaviour of assert_called_once_with. (#251) | Arne de Laat | 2017-02-23 | 1 | -2/+2 |
| | |||||
* | 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 #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.6 | Martin Panter | 2017-01-18 | 2 | -8/+8 |
|\ \ \ | |/ / | |||||
| * | | 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 |
| | | | |||||
* | | | Issue #20804: The unittest.mock.sentinel attributes now preserve their | Serhiy Storchaka | 2017-01-11 | 2 | -0/+19 |
| | | | | | | | | | | | | identity when they are copied or pickled. | ||||
* | | | Merge 3.6 | Victor Stinner | 2017-01-06 | 2 | -2/+15 |
|\ \ \ | |/ / | |||||
| * | | 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. | ||||
* | | | Issue #28919: Simplify _copy_func_details() in unittest.mock | Berker Peksag | 2016-12-15 | 1 | -18/+8 |
|/ / | | | | | | | Patch 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 |
|\ \ | |/ |