Skip to content

gh-120388: Improve deprecation warning message, when test returns non-None #120401

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

Merged
merged 7 commits into from
Jun 12, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 12, 2024

New message:

DeprecationWarning: It is deprecated to return a value that is not None, got: (<class 'coroutine'>) from a test case (<bound method TestSpecial.test_some of <test.test_enum.TestSpecial testMethod=test_some>>); a coroutine is returned, maybe you forgot to use IsolatedAsyncioTestCase base class?
  return self.run(*args, **kwds)

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks!

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

Co-authored-by: Serhiy Storchaka <[email protected]>
@sobolevn sobolevn enabled auto-merge (squash) June 12, 2024 14:14
@sobolevn sobolevn merged commit fabcf6b into python:main Jun 12, 2024
33 checks passed
@serhiy-storchaka
Copy link
Member

Thanks, @sobolevn.

mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
…ns non-None (python#120401)

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…ns non-None (python#120401)

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…ns non-None (python#120401)

Co-authored-by: Alex Waygood <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
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.

4 participants