From ddd39beb329af6136f3f26e2d5a31539f8c2cd85 Mon Sep 17 00:00:00 2001 From: William David Edwards Date: Fri, 13 Mar 2026 13:35:58 +0100 Subject: [PATCH] Clarify `spy_return_list` order --- docs/usage.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.rst b/docs/usage.rst index 80d7c66..36f8355 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -82,7 +82,7 @@ In addition, spy objects contain four extra attributes: * ``spy_return``: contains the last returned value of the spied function. * ``spy_return_iter``: contains a duplicate of the last returned value of the spied function if the value was an iterator and spy was created using ``.spy(..., duplicate_iterators=True)``. Uses `tee `__) to duplicate the iterator. -* ``spy_return_list``: contains a list of all returned values of the spied function (new in ``3.13``). +* ``spy_return_list``: contains a list of all returned values of the spied function (new in ``3.13``). If the mock was called multiple times, the list is sorted descendingly: the last value comes first. * ``spy_exception``: contain the last exception value raised by the spied function/method when it was last called, or ``None`` if no exception was raised.