Jammy2211 / PyAutoGalaxy

PyAutoGalaxy: Open-Source Multiwavelength Galaxy Structure & Morphology
https://pyautogalaxy.readthedocs.io/
MIT License
28 stars 13 forks source link

TST: Handle test warnings #65

Open pllim opened 2 years ago

pllim commented 2 years ago

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

In the log above, there are 59 warnings.

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

https://github.com/astropy/astropy.github.com/pull/491#issuecomment-1215349065