Allow spy operations to nest spy operations.

Review Request #11797 — Created Aug. 19, 2021 and submitted — Latest diff uploaded

Information

kgb
master

Reviewers

kgb

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 like SpyOpReturn or SpyOpRaise. It also
allows for more complex rulesets that nest SpyOpMatchInOrder 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.

Commits

Files