Skip to content

Conversation

@infohash
Copy link
Contributor

@infohash infohash commented Mar 21, 2024

  • Added a condition to take wraps into consideration when autospeccing objects

  • Added test cases to test wraps of a class, a class instance and a function type

  • Added order of precedence of side_effect, return_value and wraps in docs

(cherry picked from commit 735fc2c)


📚 Documentation preview 📚: https://cpython-previews--117124.org.readthedocs.build/

…hon#115223)

* set default return value of functional types as _mock_return_value

* added test of wrapping child attributes

* added backward compatibility with explicit return

* added docs on the order of precedence

* added test to check default return_value

(cherry picked from commit 735fc2c)
@cjw296 cjw296 merged commit 51da1dd into python:3.11 Mar 22, 2024
@cjw296
Copy link
Contributor

cjw296 commented Mar 22, 2024

Thanks for doing the backports!

@infohash infohash deleted the backport-735fc2c-3.11 branch March 22, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants