Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Clarify and fix assertions that mocks have not been awaited (GH-18196) | Chris Withers | 2020-01-27 | 1 | -2/+0 |
| | | | | | - The gc.collect is needed for other implementations, such as pypy - Using context managers over multiple lines will only catch the warning from the first line in the context! - remove a skip for a test that no longer fails on pypy | ||||
* | Use relative imports in mock and its tests to help backporting (GH-18197) | Chris Withers | 2020-01-27 | 1 | -5/+5 |
| | | | | | | | | * asyncio.run only available in 3.8+ * iscoroutinefunction has important bungfixes in 3.8 * IsolatedAsyncioTestCase only available in 3.8+ | ||||
* | bpo-38108: Makes mock objects inherit from Base (GH-16060) | Lisa Roach | 2019-09-28 | 1 | -3/+0 |
| | |||||
* | bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) | Lisa Roach | 2019-09-19 | 1 | -1/+34 |
| | |||||
* | Mock 100% coverage (GH-13045) | Chris Withers | 2019-05-01 | 1 | -4/+2 |
| | | | | | | | | | | | This was achieved by: * moving many pass statements in tests onto their own lines, so they pass line coverage and can match an easy ignore pattern if branch coverage is added later. * removing code that cannot be reached. * removing long-disabled tests. * removing unused code. * adding tests for uncovered code It turned out that removing `if __name__ == '__main__'` blocks that run unittest.main() at the bottom of test files was surprisingly contentious, so they remain and can be filtered out with an appropriate .coveragerc. | ||||
* | bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960) | Max Bélanger | 2018-10-25 | 1 | -0/+10 |
| | | | | 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. | ||||
* | bpo-33516: Add support for __round__ in MagicMock (GH-6880) | John Reese | 2018-05-22 | 1 | -0/+5 |
| | | | unittest.mock.MagicMock now supports the __round__() magic method. | ||||
* | 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 | ||||
* | Spelling fixes (#2902) | Ville Skyttä | 2017-08-03 | 1 | -1/+1 |
| | |||||
* | Issue #23277: Remove unused imports in tests. | Serhiy Storchaka | 2016-04-24 | 1 | -1/+0 |
| | |||||
* | Issue #23310: Fix MagicMock's initializer to work with __methods__. | Łukasz Langa | 2015-04-13 | 1 | -0/+15 |
| | | | | Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim. | ||||
* | Issue #23568: Add rdivmod support to MagicMock() objects. | Berker Peksag | 2015-03-15 | 1 | -0/+15 |
|\ | | | | | | | Patch by Håkan Lövdahl. | ||||
| * | Issue #23568: Add rdivmod support to MagicMock() objects. | Berker Peksag | 2015-03-15 | 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 20968. unittest.mock.MagicMock now supports division | Michael Foord | 2014-04-14 | 1 | -0/+25 |
| | |||||
* | Issue #19594: Use specific asserts in unittest tests. | Serhiy Storchaka | 2013-11-17 | 1 | -4/+4 |
| | |||||
* | Fix exception when calling reset_mock on a mock created with autospec | Michael Foord | 2012-06-09 | 1 | -0/+8 |
| | |||||
* | unittest.mock.MagicMock objects are now unorderable by default | Michael Foord | 2012-03-25 | 1 | -0/+13 |
| | |||||
* | PEP 417: Adding unittest.mock | Michael Foord | 2012-03-14 | 1 | -0/+382 |