Add new helper functions for checking function call results.
Review Request #9414 — Created Dec. 2, 2017 and submitted — Latest diff uploaded
This introduces new methods to check the results of function calls. It
introducesreturned()
(for checking return values),raised()
(for
checking raised exception types),raised_with_message()
(for checking
raised exception types and exception messages), andlast_*
variations
of each.It also brings all call checks (
called_with()
,returned()
,
raised()
, andraised_with_message()
) toSpyCall
, giving callers a
way to more conveniently determine results from individual calls.
Unit tests pass.