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

pytest-profiling: Fix mock in test_writes_summary #223

Conversation

s-t-e-v-e-n-k
Copy link
Contributor

In Python < 3.12, MagicMock's will blindly call any method provided to them, which is masking a real issue in this testcase. The correct method is assert_called_with(), and even worse, one of the arguments provided isn't correct either. Correct the method call, and provide the correct argument.

In Python < 3.12, MagicMock's will blindly call any method provided to
them, which is masking a real issue in this testcase. The correct method
is assert_called_with(), and even worse, one of the arguments provided
isn't correct either. Correct the method call, and provide the correct
argument.
Copy link
Contributor

@jonbannister jonbannister left a comment

Choose a reason for hiding this comment

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

Many thanks for your contribution, LGTM. Apologies for the delay!

@jonbannister jonbannister merged commit b0408fa into man-group:master Oct 4, 2024
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