Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AsyncMock to list of available modules from unittest.mock in documentation #471

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

mishaschwartz
Copy link
Contributor

When using unittest.mock as the mock_module, the AsyncMock class has been made accessible directly from the mocker fixture since v3.2.0:

if hasattr(mock_module, "AsyncMock"):
self.AsyncMock = mock_module.AsyncMock

I noticed that AsyncMock is not included in the list in the documentation so this PR adds it in.

@mishaschwartz mishaschwartz changed the title Add AsyncMock to list of available modules from mock in documentation Add AsyncMock to list of available modules from unittest.mock in documentation Nov 1, 2024
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicoddemus nicoddemus merged commit 594d7f8 into pytest-dev:main Nov 1, 2024
18 checks passed
@mishaschwartz mishaschwartz deleted the patch-1 branch November 1, 2024 17:03
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