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

Avoid PytestReturnNotNoneWarning in test_inheriting_class #9707

Merged

Conversation

graingert
Copy link
Member

@graingert graingert commented Dec 1, 2022

dask/tests/test_typing.py::test_inheriting_class
  /home/graingert/anaconda3/envs/dask-310/lib/python3.10/site-packages/_pytest/python.py:199: PytestReturnNotNoneWarning: Expected None, but dask/tests/test_typing.py::test_inheriting_class returned <dask.tests.test_typing.Inheriting object at 0x7ff3eff7bee0>, which will be an error in a future version of pytest.  Did you mean to use `assert` instead of `return`?
    warnings.warn(
  • Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @graingert! I see this is marked as a draft still -- are there other changes you'd like to add?

@douglasdavis do you have bandwidth to review?

@douglasdavis douglasdavis self-assigned this Dec 1, 2022
@graingert graingert marked this pull request as ready for review December 1, 2022 18:00
Copy link
Member

@douglasdavis douglasdavis left a comment

Choose a reason for hiding this comment

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

This looks fine, thanks for catching it!

@jrbourbeau jrbourbeau changed the title avoid PytestReturnNotNoneWarning in test_inheriting_class Avoid PytestReturnNotNoneWarning in test_inheriting_class Dec 1, 2022
@jrbourbeau jrbourbeau merged commit 23cbe9a into dask:main Dec 1, 2022
@graingert graingert deleted the avoid-pytest-return-not-none-warning branch December 1, 2022 18:23
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.

None yet

3 participants