Update unit test warnings check to ignore unrelated deprecation warnings#4188
Update unit test warnings check to ignore unrelated deprecation warnings#4188Wauplin merged 3 commits intohuggingface:mainfrom
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4188 +/- ##
==========================================
+ Coverage 75.00% 77.23% +2.23%
==========================================
Files 145 170 +25
Lines 13978 19400 +5422
==========================================
+ Hits 10484 14984 +4500
- Misses 3494 4416 +922 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fd8afcf. Configure here.
Wauplin
left a comment
There was a problem hiding this comment.
Thanks!
Feel free to merge once hf-xet version is unpinned :)
|
This PR has been shipped as part of the v1.14.0 release. |

The unit test
test_buckets.py/test_download_bucket_files_skips_missing_first_fileasserts number of warning messages emit from downloading a "non existent" bucket file is 1. Sincehf-xet1.5.0, it emits deprecation warning message from legacy APIs (upload_files,download_files, ...) so this unit test fails in the hf-xet pre-release testing workflow, e.g. in https://github.com/huggingface/huggingface_hub/actions/runs/25361805293/job/74362888965:This PR updates this unit test to filter out unrelated deprecation warnings.
Note
Low Risk
Low risk: changes are limited to a unit test assertion and only affect how warnings are filtered/validated during test execution.
Overview
Makes
test_download_bucket_files_skips_missing_first_fileresilient to extra warnings by filtering the captured warnings to only those mentioning the missing file, instead of asserting an exact warning count.Reviewed by Cursor Bugbot for commit 0216046. Bugbot is set up for automated code reviews on this repo. Configure here.