Allow spy operations to nest spy operations.
Review Request #11797 — Created Aug. 19, 2021 and submitted — Latest diff uploaded
Spy operations that take list of expected calls can now define an
op
key in a call for a nested spy operation. This allows them to take
advantage of useful ops likeSpyOpReturn
orSpyOpRaise
. It also
allows for more complex rulesets that nestSpyOpMatchInOrder
within a
SpyOpMatchAny
, which is useful when there's a lot of calls to a
utility function with different arguments.This will be the major feature for 6.1.
Unit tests pass for all supported versions of Python.