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

Treat warnings in unit tests as errors #247

Merged
merged 1 commit into from
Feb 27, 2025

Conversation

lpsinger
Copy link
Contributor

@lpsinger lpsinger commented Feb 3, 2025

Fixes #240.

@lpsinger lpsinger requested a review from pllim February 27, 2025 18:34
@pllim
Copy link
Member

pllim commented Feb 27, 2025

RuntimeWarning: numpy.ndarray size changed

On astropy, we just end up ignoring it... 😬

@lpsinger
Copy link
Contributor Author

RuntimeWarning: numpy.ndarray size changed

On astropy, we just end up ignoring it... 😬

I tried to ignore it in my last commit, but it didn't work. Would you please take a look?

@pllim
Copy link
Member

pllim commented Feb 27, 2025

I wonder if the order matters. I have only used that list by listing "error" first, not last.

Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.23%. Comparing base (d794c15) to head (46857f5).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #247   +/-   ##
=======================================
  Coverage   96.23%   96.23%           
=======================================
  Files           6        6           
  Lines         504      505    +1     
=======================================
+ Hits          485      486    +1     
  Misses         19       19           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lpsinger
Copy link
Contributor Author

I wonder if the order matters. I have only used that list by listing "error" first, not last.

That did it. Tests are passing now.

@pllim pllim merged commit 41d0091 into astropy:main Feb 27, 2025
12 checks passed
@pllim
Copy link
Member

pllim commented Feb 27, 2025

Thanks!

@lpsinger lpsinger deleted the warnings-as-errors branch February 27, 2025 21:13
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.

TST: Consider turning unhandled warnings into exceptions
2 participants