• 
      

    Improve the error for unexpected function call spies in operations.

    Review Request #11798 — Created Aug. 20, 2021 and submitted — Latest diff uploaded

    Information

    kgb
    master

    Reviewers

    kgb

    In match-based spy operations, exceptions are raised when a call is made
    to a spy that either exceeds or doesn't match the list of expected
    calls.

    To help with debugging these situations, the exception now includes the
    call that triggered the exception.

    This uncovered an issue in SpyCall.__repr__ where a ) was missing
    near the end of the string.

    Unit tests pass on Python 2 and 3.

    Commits

    Files