Support partial argument checks for function calls.
Review Request #9415 — Created Dec. 2, 2017 and submitted — Latest diff uploaded
kgb 1.0 changed how keyword arguments were stored and how they had to be
checked, requiring thatcalled_with()
andlast_called_with()
be
provided with the entirety of the positional and keyword arguments made
to the call. This wasn't really ideal, but was necessary with how those
checks were being performed.This change fixes that and makes these calls a lot more flexible. These
functions now accept partial arguments. A subset of the positional
arguments (starting with the first one) can now be passed, and a subset
of the keyword arguments can be passed. If the subsets are found within
the called argument lists, it will be considered a math.
Unit tests pass.