Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-93851: Fix all broken links in Doc/ (GH-93853) | Oleg Iarygin | 2022-06-21 | 1 | -1/+1 |
| | |||||
* | gh-92417: `unittest.mock` docs: remove references to Python <2.6 (GH-92539) | Alex Waygood | 2022-05-10 | 1 | -1/+1 |
| | |||||
* | bpo-47235: Note where a typo is intentional in code. (GH-32348) | Gregory P. Smith | 2022-04-06 | 1 | -4/+4 |
| | | | | | | | | | | | People keep popping up reporting these as typos in the docs despite being described as typos in the surrounding text. Hopefully a comment on the line itself makes it more obvious? Arguably some of the typo examples are not using the "right" typo as the "assret" one in particular is now detected by default due to how common it was in actual code. But I don't want to to typo chasing by changing these examples to be other not yet auto-detected typos as they still illustrate the point well enough. | ||||
* | bpo-46852: Remove the float.__set_format__() method (GH-31585) | Victor Stinner | 2022-02-25 | 1 | -1/+1 |
| | | | | | | Remove the undocumented private float.__set_format__() method, previously known as float.__set_format__() in Python 3.7. Its docstring said: "You probably don't want to use this function. It exists mainly to be used in Python's test suite." | ||||
* | doc: fix a typo in unittest.mock.rst (GH-30227) | Joe | 2021-12-26 | 1 | -1/+1 |
| | |||||
* | bpo-45010: Remove support of special method __div__ in unittest.mock (GH-27965) | Serhiy Storchaka | 2021-08-26 | 1 | -1/+1 |
| | |||||
* | bpo-44679: [doc] fix typo in unittest.mock.rst (GH-27618) | Jack DeVries | 2021-08-05 | 1 | -1/+1 |
| | |||||
* | bpo-44534: fix wording and docstring sync in unittest.Mock GH27000 | Jack DeVries | 2021-07-05 | 1 | -1/+1 |
| | |||||
* | Remove duplicate words in docs. (GH-26167) | Mariusz Felisiak | 2021-05-21 | 1 | -2/+2 |
| | |||||
* | bpo-43400: Remove "easy to use" from mock docs (GH-24752) | Eddie Peters | 2021-03-04 | 1 | -1/+1 |
| | |||||
* | bpo-41877: Improve docs for assert misspellings check in mock (GH-23729) | vabr-g | 2020-12-10 | 1 | -3/+4 |
| | | | | | | | | | This is a follow-up to https://github.com/python/cpython/commit/4662fa9bfe4a849fe87bfb321d8ef0956c89a772. That original commit expanded guards against misspelling assertions on mocks. This follow-up updates the documentation and improves the error message by pointing out the potential cause and solution. Automerge-Triggered-By: GH:gpshead | ||||
* | bpo-41325: Add version note for args and kwargs property in call object ↵ | Jordan Speicher | 2020-07-18 | 1 | -0/+3 |
| | | | | (GH-21525) | ||||
* | Remove note saying patch is straightforward (#18431) | Brian Curtin | 2020-02-10 | 1 | -2/+1 |
| | | | | | | | While `unittest.mock.patch` is a great thing, it is not straightforward. If it were straightforward there wouldn't be such a huge amount of documentation for it, and frankly, when myself and others who I've read about often struggle to figure out what on earth `patch()` wants, coming to the docs to read that it's straightforward is not helpful. | ||||
* | bpo-37955: correct mock.patch docs with respect to the returned type (GH-15521) | Paulo Henrique Silva | 2020-01-25 | 1 | -1/+2 |
| | |||||
* | Fix AsyncMock base class in the docs (GH-18008) | Elena Oat | 2020-01-15 | 1 | -1/+1 |
| | |||||
* | bpo-38857: AsyncMock fix for awaitable values and StopIteration fix [3.8] ↵ | Jason Fried | 2019-11-21 | 1 | -1/+1 |
| | | | | (GH-17269) | ||||
* | bpo-38753: AsyncMock added in version 3.8 (GH-17102) | John Belmonte | 2019-11-20 | 1 | -0/+1 |
| | |||||
* | bpo-38738: Fix formatting of True and False. (GH-17083) | Serhiy Storchaka | 2019-11-12 | 1 | -17/+17 |
| | | | | | | | | | * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>". | ||||
* | bpo-38163: Child mocks detect their type as sync or async (GH-16471) | Lisa Roach | 2019-09-30 | 1 | -1/+27 |
| | |||||
* | bpo-38136: Updates await_count and call_count to be different things (GH-16192) | Lisa Roach | 2019-09-24 | 1 | -24/+13 |
| | |||||
* | bpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456) | Emmanuel Arias | 2019-09-12 | 1 | -4/+27 |
| | |||||
* | bpo-37383: Updates docs to reflect AsyncMock call_count after await. (#15761) | Lisa Roach | 2019-09-09 | 1 | -0/+14 |
| | | | | | | | | | | * bpo-351428: Updates documentation to reflect AsyncMock call_count after await. * Adds skip and fixes warning. * Removes extra >>>. * Adds ... in front of await mock(). | ||||
* | docs: Add references to AsyncMock in unittest.mock.patch (#13681) | Mario Corchero | 2019-09-09 | 1 | -4/+16 |
| | | | | Update the docs as patch can now return an AsyncMock if the patched object is an async function. | ||||
* | bpo-35946: Improve assert_called_with documentation (GH-11796) | Rémi Lapeyre | 2019-08-29 | 1 | -2/+2 |
| | |||||
* | Fix docs for assert_called and assert_called_once (#15197) | Ismail S | 2019-08-12 | 1 | -2/+2 |
| | |||||
* | bpo-37075: Fix string concatenation in assert_has_awaits error message ↵ | Xtreak | 2019-05-29 | 1 | -1/+2 |
| | | | | | | | | | | (GH-13616) * Fix the implicit string concatenation in `assert_has_awaits` error message. * Use "await" instead of "call" in `assert_awaited_with` error message. https://bugs.python.org/issue37075 | ||||
* | bpo-32299: Return patched dict when using patch.dict as a context manager ↵ | Mario Corchero | 2019-05-28 | 1 | -1/+10 |
| | | | | | | (GH-11062) | ||||
* | bpo-37047: Refactor AsyncMock setup logic for autospeccing (GH-13574) | Xtreak | 2019-05-27 | 1 | -1/+5 |
| | | | | Handle late binding and attribute access in unittest.mock.AsyncMock setup for autospeccing. | ||||
* | Fix RuntimeWarning in unittest.mock asyncio example (GH-13449) | Xtreak | 2019-05-21 | 1 | -2/+2 |
| | | | | * This PR fixes the `RuntimeWarning` in `inspect.isawaitable(mock())` where `mock()` was not awaited. * Fix typo in asynctest project. | ||||
* | bpo-26467: Adds AsyncMock for asyncio Mock library support (GH-9296) | Lisa Roach | 2019-05-20 | 1 | -1/+214 |
| | |||||
* | bpo-21269: Provide args and kwargs attributes on mock call objects GH11807 | Kumar Akshay | 2019-03-22 | 1 | -8/+17 |
| | |||||
* | Fix typo in unittest.mock documentation: manger -> manager (GH-12352) | Joan Massich | 2019-03-17 | 1 | -1/+1 |
| | |||||
* | Add example to the documentation for calling unittest.mock.patch with ↵ | Pablo Galindo | 2019-01-09 | 1 | -7/+28 |
| | | | | create=True (GH-11056) | ||||
* | bpo-35226: Fix equality for nested unittest.mock.call objects. (#10555) | Chris Withers | 2018-12-03 | 1 | -0/+13 |
| | | | | Also refactor the call recording imolementation and add some notes about its limitations. | ||||
* | bpo-35022: unittest.mock.MagicMock now also supports __fspath__ (GH-9960) | Max Bélanger | 2018-10-25 | 1 | -0/+4 |
| | | | | 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 | -4/+5 |
| | | | | | The docs in `library/unittest.mock` have been updated to remove confusing terms about submock and be explicit about the behavior expected. | ||||
* | bpo-34962: make doctest in Doc/ now passes, and is enforced in CI (GH-9806) | Stéphane Wirtel | 2018-10-12 | 1 | -32/+68 |
| | |||||
* | Fix "Python" casing in a few places (GH-9001) | Andrés Delfino | 2018-09-14 | 1 | -1/+1 |
| | |||||
* | bpo-32933: Implement __iter__ method on mock_open() (GH-5974) | Tony Flury | 2018-09-12 | 1 | -0/+4 |
| | |||||
* | Fix margin in sentinel and mock_open (GH-8188) | Andrés Delfino | 2018-07-09 | 1 | -21/+21 |
| | |||||
* | bpo-33516: Add support for __round__ in MagicMock (GH-6880) | John Reese | 2018-05-22 | 1 | -1/+1 |
| | | | unittest.mock.MagicMock now supports the __round__() magic method. | ||||
* | bpo-33503: Fix the broken pypi link in the source and the documentation ↵ | Stéphane Wirtel | 2018-05-15 | 1 | -2/+2 |
| | | | | (GH-6814) | ||||
* | Cleanup grammar in unittest.mock.seal documentation (#5107) | Paul Ganssle | 2018-01-06 | 1 | -4/+4 |
| | |||||
* | Fix miscellaneous typos (#4275) | luzpaz | 2017-11-05 | 1 | -1/+1 |
| | |||||
* | bpo-30541: Add new method to seal mocks (GH61923) | Mario Corchero | 2017-10-17 | 1 | -0/+20 |
| | | | | | | | 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> | ||||
* | Corrected grammar mistake in documentation (#1713) | Ben Lloyd | 2017-05-22 | 1 | -2/+2 |
| | | | There was an unneeded space before a closing parenthesis in the `unittest.mock` documentation. | ||||
* | bpo-28911: Clarify the behaviour of assert_called_once_with. (#251) | Arne de Laat | 2017-02-23 | 1 | -5/+6 |
| | |||||
* | Issue #20804: The unittest.mock.sentinel attributes now preserve their | Serhiy Storchaka | 2017-01-11 | 1 | -0/+4 |
| | | | | identity when they are copied or pickled. | ||||
* | Issue #19795: Mark up None as literal text. | Serhiy Storchaka | 2016-10-19 | 1 | -1/+1 |
|\ | |||||
| * | Issue #19795: Mark up None as literal text. | Serhiy Storchaka | 2016-10-19 | 1 | -1/+1 |
| | |