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

TST: Handle test warnings #65

Open
pllim opened this issue Aug 15, 2022 · 0 comments
Open

TST: Handle test warnings #65

pllim opened this issue Aug 15, 2022 · 0 comments

Comments

@pllim
Copy link
Contributor

pllim commented Aug 15, 2022

Example log: https://github.com/Jammy2211/PyAutoGalaxy/runs/7808313167?check_suite_focus=true

In the log above, there are 59 warnings.

  • Most of them are deprecation warnings (which indicate the code needs to catch up or risk being broken when new upstream releases are made).
  • The PytestAssertRewriteWarning: assertion is always true looks like a testing bug and needs to be fixed.
  • Not sure what UserWarning is about but might be a bug too.

Bonus: Turn all pytest warnings into failures and explicitly handle them (either ignore on purpose globally or on a case-by-case basis for reason beyond your control, or mark them as expected warning using pytest.warns, or fix the use case so warning does not get raised at all).

Also see https://docs.pytest.org/en/stable/how-to/capture-warnings.html

astropy/astropy.github.com#491 (comment)

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

No branches or pull requests

1 participant