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

Fix unittest warning handling with pytest 8.0 #1489

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Conversation

guarin
Copy link
Contributor

@guarin guarin commented Jan 30, 2024

Changes

  • Use warnings.catch_warning instead of pytest.warns(None) as the latter was deprecated in pytest 8.0

This fixes a bug where our unit tests recently started failing due to the deprecation.
Example of failing test: https://github.com/lightly-ai/lightly/actions/runs/7708499394/job/21007710296

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6bd7553) 84.38% compared to head (d34c781) 84.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1489      +/-   ##
==========================================
+ Coverage   84.38%   84.40%   +0.02%     
==========================================
  Files         139      139              
  Lines        5756     5777      +21     
==========================================
+ Hits         4857     4876      +19     
- Misses        899      901       +2     

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

@guarin guarin merged commit 25894a9 into master Jan 30, 2024
12 checks passed
@guarin guarin deleted the guarin-fix-unit-tests branch January 30, 2024 13:57
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.

2 participants