Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 4.0 #476

Merged
merged 70 commits into from Jan 29, 2020
Merged

version 4.0 #476

merged 70 commits into from Jan 29, 2020

Commits on Jan 13, 2020

  1. Configuration menu
    Copy the full SHA
    d1118fb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4680a96 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f8d22bc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4195207 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ce5b696 View commit details
    Browse the repository at this point in the history
  6. not needed in backport

    cjw296 committed Jan 13, 2020
    Configuration menu
    Copy the full SHA
    b81f7b6 View commit details
    Browse the repository at this point in the history
  7. fix imports

    cjw296 committed Jan 13, 2020
    Configuration menu
    Copy the full SHA
    389e48e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b3d20d4 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2020

  1. Configuration menu
    Copy the full SHA
    cdf2d79 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    45c1e65 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    12bd6d5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3d44cb8 View commit details
    Browse the repository at this point in the history
  5. Skip cpython's 2085bd0877e17ad4d98a4586d5eabb6faecbb190 as PEP 570 sy…

    …ntax for positional-only parameters would limit this codebase to being Py3.8+ only.
    cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    9b35e34 View commit details
    Browse the repository at this point in the history
  6. bpo-21478: Record calls to parent when autospecced objects are used a…

    …s child with attach_mock (GH 14688)
    
    * Clear name and parent of mock in autospecced objects used with attach_mock
    
    * Add NEWS entry
    
    * Fix reversed order of comparison
    
    * Test child and standalone function calls
    
    * Use a helper function extracting mock to avoid code duplication and refactor tests.
    
    Backports: 7397cda99795a4a8d96193d710105e77a07b7411
    Signed-off-by: Chris Withers <chris@withers.org>
    tirkarthi authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    20abe16 View commit details
    Browse the repository at this point in the history
  7. Fix typos in comments, docs and test names (#15018)

    * Fix typos in comments, docs and test names
    
    * Update test_pyparse.py
    
    account for change in string length
    
    * Apply suggestion: splitable -> splittable
    
    Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
    
    * Apply suggestion: splitable -> splittable
    
    Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
    
    * Apply suggestion: Dealloccte -> Deallocate
    
    Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu>
    
    * Update posixmodule checksum.
    
    * Reverse idlelib changes.
    
    Backports: c4cacc8c5eab50db8da3140353596f38a01115ca
    Signed-off-by: Chris Withers <chris@withers.org>
    minho42 authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    ae02b30 View commit details
    Browse the repository at this point in the history
  8. bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. …

    …(GH-14952)
    
    They now return NotImplemented for unsupported type of the other operand.
    
    Backports: 662db125cddbca1db68116c547c290eb3943d98e
    Signed-off-by: Chris Withers <chris@withers.org>
    serhiy-storchaka authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    cd18e01 View commit details
    Browse the repository at this point in the history
  9. bpo-36871: Ensure method signature is used when asserting mock calls …

    …to a method (GH13261)
    
    * Fix call_matcher for mock when using methods
    
    * Add NEWS entry
    
    * Use None check and convert doctest to unittest
    
    * Use better name for mock in tests. Handle _SpecState when the attribute was not accessed and add tests.
    
    * Use reset_mock instead of reinitialization. Change inner class constructor signature for check
    
    * Reword comment regarding call object lookup logic
    
    Backports: c96127821ebda50760e788b1213975a0d5bea37f
    Signed-off-by: Chris Withers <chris@withers.org>
    tirkarthi authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    9f43738 View commit details
    Browse the repository at this point in the history
  10. bpo-35946: Improve assert_called_with documentation (GH-11796)

    Backports: f5896a05edf5df91fb1b55bd481ba5b2a3682f4e
    Signed-off-by: Chris Withers <chris@withers.org>
    Rémi Lapeyre authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    202ff78 View commit details
    Browse the repository at this point in the history
  11. bpo-36743: __get__ is sometimes called without the owner argument (#1…

    …2992)
    
    Backports: 0dac68f1e593c11612ed54af9edb865d398f3b05
    Signed-off-by: Chris Withers <chris@withers.org>
    rhettinger authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    20fce5d View commit details
    Browse the repository at this point in the history
  12. Fix typos mostly in comments, docs and test names (GH-15209)

    Backports: 39d87b54715197ca9dcb6902bb43461c0ed701a2
    Signed-off-by: Chris Withers <chris@withers.org>
    minho42 authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    97bf5a4 View commit details
    Browse the repository at this point in the history
  13. Fix assertions regarding magic methods function body that was not exe…

    …cuted (GH-14154)
    
    Backports: aa515082749687c1e3bc9ec5e2296368191b9f84
    Signed-off-by: Chris Withers <chris@withers.org>
    tirkarthi authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    39b5272 View commit details
    Browse the repository at this point in the history
  14. bpo-37212: Preserve keyword argument order in unittest.mock.call and …

    …error messages (GH-14310)
    
    Backports: 9d607061c9c888913ae2c18543775cf360d55f27
    Signed-off-by: Chris Withers <chris@withers.org>
    tirkarthi authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    93f85f9 View commit details
    Browse the repository at this point in the history
  15. docs: Add references to AsyncMock in unittest.mock.patch (#13681)

    Update the docs as patch can now return an AsyncMock if the patched
    object is an async function.
    
    Backports: f5e7f39d2916ed150e80381faed125f405a11e11
    Signed-off-by: Chris Withers <chris@withers.org>
    mariocj89 authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    42ae9eb View commit details
    Browse the repository at this point in the history
  16. bpo-37251: Removes __code__ check from _is_async_obj. (GH-15830)

    Backports: f1a297acb60b88917712450ebd3cfa707e6efd6b
    Signed-off-by: Chris Withers <chris@withers.org>
    lisroach authored and cjw296 committed Jan 24, 2020
    Configuration menu
    Copy the full SHA
    d8170ff View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    08a2de7 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2020

  1. bpo-37555: Update _CallList.__contains__ to respect ANY (#14700)

    * Flip equality to use mock calls' __eq__
    
    * bpo-37555: Regression test demonstrating assert_has_calls not working with ANY and spec_set
    
    Co-authored-by: Neal Finne <neal@nealfinne.com>
    
    * Revert "Flip equality to use mock calls' __eq__"
    
    This reverts commit 94ddf54c5a8aab7d00d9ab93e1cc5695c28d73e7.
    
    * bpo-37555: Add regression tests for mock ANY ordering issues
    
    Add regression tests for whether __eq__ is order agnostic on _Call and _CallList, which is useful for comparisons involving ANY, especially if the ANY comparison is to a class not defaulting __eq__ to NotImplemented.
    
    Co-authored-by: Neal Finne <neal@nealfinne.com>
    
    * bpo-37555: Fix _CallList and _Call order sensitivity
    
    _Call and _CallList depend on ordering to correctly process that an object being compared to ANY with __eq__ should return True. This fix updates the comparison to check both a == b and b == a and return True if either condition is met, fixing situations from the tests in the previous two commits where assertEqual would not be commutative if checking _Call or _CallList objects. This seems like a reasonable fix considering that the Python data model specifies that if an object doesn't know how to compare itself to another object it should return NotImplemented, and that on getting NotImplemented from a == b, it should try b == a, implying that good behavior for __eq__ is commutative. This also flips the order of comparison in _CallList's __contains__ method, guaranteeing ANY will be on the left and have it's __eq__ called for equality checking, fixing the interaction between assert_has_calls and ANY.
    
    Co-author: Neal Finne <neal@neal.finne.com>
    
    * bpo-37555: Ensure _call_matcher returns _Call object
    
    * Adding ACK and news entry
    
    * bpo-37555: Replacing __eq__ with == to sidestep NotImplemented
    
    bool(NotImplemented) returns True, so it's necessary to use ==
    instead of __eq__ in this comparison.
    
    * bpo-37555: cleaning up changes unnecessary to the final product
    
    * bpo-37555: Fixed call on bound arguments to respect args and kwargs
    
    * Revert "bpo-37555: Add regression tests for mock ANY ordering issues"
    
    This reverts commit 49c5310ad493c4356dd3bc58c03653cd9466c4fa.
    
    * Revert "bpo-37555: cleaning up changes unnecessary to the final product"
    
    This reverts commit 18e964ba0126d8964d89842cb95534b63c2d326e.
    
    * Revert "bpo-37555: Replacing __eq__ with == to sidestep NotImplemented"
    
    This reverts commit f295eaca5bceac6636c0e2b10e6c7d9a8ee8296a.
    
    * Revert "bpo-37555: Fix _CallList and _Call order sensitivity"
    
    This reverts commit 874fb697b8376fcea130116e56189061f944fde6.
    
    * Updated NEWS.d
    
    * bpo-37555: Add tests checking every function using _call_matcher both with and without spec
    
    * bpo-37555: Ensure all assert methods using _call_matcher are actually passing calls
    
    * Remove AnyCompare and use call objects everywhere.
    
    * Revert "Remove AnyCompare and use call objects everywhere."
    
    This reverts commit 24973c0b32ce7d796a7f4eeaf259832222aae0f5.
    
    * Check for exception in assert_any_await
    
    Backports: d6a9d17d8b6c68073931dd8ffa213b4ac351a4ab
    Signed-off-by: Chris Withers <chris@withers.org>
    ElizabethU authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    702d35b View commit details
    Browse the repository at this point in the history
  2. bpo-38122: minor fixes to AsyncMock spec handling (GH-16099)

    Backports: 14fd925a18fe3db0922a7d798e373102fe7a8a9c
    Signed-off-by: Chris Withers <chris@withers.org>
    voidspace authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    21ea393 View commit details
    Browse the repository at this point in the history
  3. bpo-38100: Fix spelling error in unittest.mock code (GH-16168)

    Backports: a9187c31185fe7ea47271839898416400cc3d976
    Signed-off-by: Chris Withers <chris@withers.org>
    marcoramirezmx authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    14aaccb View commit details
    Browse the repository at this point in the history
  4. bpo-37828: Fix default mock_name in unittest.mock.assert_called error…

    … (GH-16166)
    
    In the format string for assert_called the evaluation order is incorrect and hence for mock's without name, 'None' is printed whereas it should be 'mock' like for other messages. The error message is ("Expected '%s' to have been called." % self._mock_name or 'mock').
    
    Backports: 5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa
    Signed-off-by: Chris Withers <chris@withers.org>
    categulario authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    3b149c9 View commit details
    Browse the repository at this point in the history
  5. bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947)

    Backports: 8b03f943c37e07fb2394acdcfacd066647f9b1fd
    Signed-off-by: Chris Withers <chris@withers.org>
    lisroach authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    136175a View commit details
    Browse the repository at this point in the history
  6. bpo-38136: Updates await_count and call_count to be different things …

    …(GH-16192)
    
    Backports: ef048517755db1f0d211fb6dfc655a8b412cc96f
    Signed-off-by: Chris Withers <chris@withers.org>
    lisroach authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    d66e9d7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e702e61 View commit details
    Browse the repository at this point in the history
  8. bpo-36871: Handle spec errors in assert_has_calls (GH-16005)

    The fix in PR 13261 handled the underlying issue about the spec for specific methods not being applied correctly, but it didn't fix the issue that was causing the misleading error message.
    
    The code currently grabs a list of responses from _call_matcher (which may include exceptions). But it doesn't reach inside the list when checking if the result is an exception. This results in a misleading error message when one of the provided calls does not match the spec.
    
    https://bugs.python.org/issue36871
    
    Automerge-Triggered-By: @gpshead
    Backports: b5a7a4f0c20717a4c92c371583b5521b83f40f32
    Signed-off-by: Chris Withers <chris@withers.org>
    sfreilich authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    a0e820d View commit details
    Browse the repository at this point in the history
  9. bpo-36871: Avoid duplicated 'Actual:' in assertion message (GH-16361)

    Fixes an issue caught after merge of PR 16005.
    
    Tightened test assertions to check the entire assertion message.
    
    Backports: 2180f6b058effbf49ec819f7cedbe76ddd4b700c
    Signed-off-by: Chris Withers <chris@withers.org>
    sfreilich authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    3bdebf2 View commit details
    Browse the repository at this point in the history
  10. support for py3.6

    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    ee8bbd4 View commit details
    Browse the repository at this point in the history
  11. bpo-38108: Makes mock objects inherit from Base (GH-16060)

    Backports: 9a7d9519506ae807ca48ff02e2ea117ebac3450e
    Signed-off-by: Chris Withers <chris@withers.org>
    lisroach authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    be7df81 View commit details
    Browse the repository at this point in the history
  12. bpo-38161: Removes _AwaitEvent from AsyncMock. (GH-16443)

    Backports: 25e115ec00b5f75e3589c9f21013c47c21e1753f
    Signed-off-by: Chris Withers <chris@withers.org>
    lisroach authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    189dffb View commit details
    Browse the repository at this point in the history
  13. bpo-38163: Child mocks detect their type as sync or async (GH-16471)

    Backports: 3667e1ee6c90e6d3b6a745cd590ece87118f81ad
    Signed-off-by: Chris Withers <chris@withers.org>
    lisroach authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    ec2bfa7 View commit details
    Browse the repository at this point in the history
  14. bpo-38839: Fix some unused functions in tests (GH-17189)

    Backports: 892221bfa04a41cf581f988ba19dc263f557e157
    Signed-off-by: Chris Withers <chris@withers.org>
    adamchainz authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    0fda551 View commit details
    Browse the repository at this point in the history
  15. bpo-38857: AsyncMock fix for awaitable values and StopIteration fix […

    …3.8] (GH-17269)
    
    Backports: 046442d02bcc6e848e71e93e47f6cde9e279e993
    Signed-off-by: Chris Withers <chris@withers.org>
    fried authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    30cc188 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    a6768e6 View commit details
    Browse the repository at this point in the history
  17. bpo-38669: patch.object now raises a helpful error (GH17034)

    This means a clearer message is now shown when patch.object is called with two string arguments, rather than a class and a string argument.
    
    Backports: cd90a52983db34896a6335a572d55bdda274778f
    Signed-off-by: Chris Withers <chris@withers.org>
    elenaoat authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    c000fff View commit details
    Browse the repository at this point in the history
  18. remove unused __version__ from mock.py (#17977)

    This isn't included in `__all__` and could be a source of confusion.
    
    Backports: 31d6de5aba009914efa8f0f3c3d7da35217578eb
    Signed-off-by: Chris Withers <chris@withers.org>
    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    695580a View commit details
    Browse the repository at this point in the history
  19. Improve test coverage for AsyncMock. (GH-17906)

    * Add test for nested async decorator patch.
    * Add test for side_effect and wraps with a function.
    * Add test for side_effect with an exception in the iterable.
    
    Backports: 54f743eb315f00b0ff45e115dde7a5d506034153
    Signed-off-by: Chris Withers <chris@withers.org>
    tirkarthi authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    7a35f3a View commit details
    Browse the repository at this point in the history
  20. bpo-24928: Add test case for patch.dict using OrderedDict (GH -11437)

    * add test for path.dict using OrderedDict
    
    Co-authored-by: Yu Tomita nekobon@users.noreply.github.com
    Backports: 1d0c5e16eab29d55773cc4196bb90d2bf12e09dd
    Signed-off-by: Chris Withers <chris@withers.org>
    eamanu authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    aa5f6e9 View commit details
    Browse the repository at this point in the history
  21. Fix mock.patch.dict to be stopped with mock.patch.stopall (#17606)

    As the function was not registering in the active patches, the mocks
    started by `mock.patch.dict` were not being stopped when
    `mock.patch.stopall` was being called.
    
    Backports: e131c9720d087c0c4988bd2a5c62020feb9d1d77
    Signed-off-by: Chris Withers <chris@withers.org>
    mariocj89 authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    11df596 View commit details
    Browse the repository at this point in the history
  22. bpo-38473: Handle autospecced functions and methods used with attach_…

    …mock (GH-16784)
    
    Backports: 66b00a9d3aacf6ed49412f48743e4913104a2bb3
    Signed-off-by: Chris Withers <chris@withers.org>
    tirkarthi authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    5de813c View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    610e9e3 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    5a12423 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    7a5fc54 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    8d3d8f2 View commit details
    Browse the repository at this point in the history
  27. bpo-39082: Allow AsyncMock to correctly patch static/class methods (G…

    …H-18116)
    
    Backports: 62865f4532094017a9b780b704686ca9734bc329
    Signed-off-by: Chris Withers <chris@withers.org>
    mkokotovich authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    ad2b38d View commit details
    Browse the repository at this point in the history
  28. bpo-37955: correct mock.patch docs with respect to the returned type …

    …(GH-15521)
    
    Backports: 40c080934b3d49311209b1cb690c2ea1e04df7e7
    Signed-off-by: Chris Withers <chris@withers.org>
    phsilva authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    1d85e1a View commit details
    Browse the repository at this point in the history
  29. bpo-38932: Mock fully resets child objects on reset_mock(). (GH-17409)

    Backports: aef7dc89879d099dc704bd8037b8a7686fb72838
    Signed-off-by: Chris Withers <chris@withers.org>
    vegarsti authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    0dc01d6 View commit details
    Browse the repository at this point in the history
  30. bpo-25597: Ensure wraps' return value is used for magic methods in Ma…

    …gicMock (#16029)
    
    Backports: 72b1004657e60c900e4cd031b2635b587f4b280e
    Signed-off-by: Chris Withers <chris@withers.org>
    tirkarthi authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    7409327 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    04ebc28 View commit details
    Browse the repository at this point in the history
  32. Clarify and fix assertions that mocks have not been awaited (GH-18196)

    - 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
    
    Backports: a46575a8f2ded8b49e26c25bb67192e1500e76ca
    Signed-off-by: Chris Withers <chris@withers.org>
    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    a4d8fae View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    af0e3ed View commit details
    Browse the repository at this point in the history
  34. fixup: uncache backport

    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    d6deb20 View commit details
    Browse the repository at this point in the history
  35. ignore empty yield methods too

    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    608b1bd View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    0c6893a View commit details
    Browse the repository at this point in the history
  37. bpo-39485: fix corner-case in method-detection of mock (GH-18252)

    Replace check for whether something is a method in the mock module. The
    previous version fails on PyPy, because there no method wrappers exist
    (everything looks like a regular Python-defined function). Thus the
    isinstance(getattr(result, '__get__', None), MethodWrapperTypes) check
    returns True for any descriptor, not just methods.
    
    This condition could also return erroneously True in CPython for
    C-defined descriptors.
    
    Instead to decide whether something is a method, just check directly
    whether it's a function defined on the class. This passes all tests on
    CPython and fixes the bug on PyPy.
    
    Backports: a327677905956ae0b239ff430a1346dfe265709e
    Signed-off-by: Chris Withers <chris@withers.org>
    cfbolz authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    5db45d4 View commit details
    Browse the repository at this point in the history
  38. Get mock coverage back to 100% (GH-18228)

    * use the `: pass` and `: yield` patterns for code that isn't expected to ever be executed.
    
    * The _Call items passed to _AnyComparer are only ever of length two, so assert instead of if/else
    
    * fix typo
    
    * Fix bug, where stop-without-start patching dict blows up with `TypeError: 'NoneType' object is not iterable`, highlighted by lack of coverage of an except branch.
    
    * The fix for bpo-37972 means _Call.count and _Call.index are no longer needed.
    
    * add coverage for calling next() on a mock_open with readline.return_value set.
    
    * __aiter__ is defined on the Mock so the one on _AsyncIterator is never called.
    
    Backports: db5e86adbce12350c26e7ffc2c6673369971a2dc
    Signed-off-by: Chris Withers <chris@withers.org>
    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    9b05bea View commit details
    Browse the repository at this point in the history
  39. bpo-37972: unittest.mock._Call now passes on __getitem__ to the __get…

    …attr__ chaining so that call() can be subscriptable (GH-15565)
    
    * bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable
    
    * 📜🤖 Added by blurb_it.
    
    * Update 2019-08-28-21-40-12.bpo-37972.kP-n4L.rst
    
    added name of the contributor
    
    * bpo-37972: made all dunder methods chainable for _Call
    
    * bpo-37972: delegate only attributes of tuple instead to __getattr__
    
    Backports: 72c359912d36705a94fca8b63d80451905a14ae4
    Signed-off-by: Chris Withers <chris@withers.org>
    blhsing authored and cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    a294948 View commit details
    Browse the repository at this point in the history
  40. latest sync point

    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    3610394 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    37f664b View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    7fd1749 View commit details
    Browse the repository at this point in the history
  43. another code coverage pattern

    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    fe43b42 View commit details
    Browse the repository at this point in the history
  44. ReST bugfix

    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    9004d44 View commit details
    Browse the repository at this point in the history
  45. Preparing for 4.1.0 release.

    cjw296 committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    ba8cbf9 View commit details
    Browse the repository at this point in the history