Skip to content

fix(storage): test_transfer_manager counts unwanted deprecated warnings#16744

Merged
parthea merged 2 commits intomainfrom
fix-transfer-manager-test
Apr 21, 2026
Merged

fix(storage): test_transfer_manager counts unwanted deprecated warnings#16744
parthea merged 2 commits intomainfrom
fix-transfer-manager-test

Conversation

@nidhiii-27
Copy link
Copy Markdown
Contributor

@nidhiii-27 nidhiii-27 commented Apr 21, 2026

test_transfer_manager::test_download_many_to_path_raises_invalid_path_error catches all types of warnings (including FutureWarnings and DeprecationWarnings) whereas it is only required to check invalid path warnings.
Fixed the test to only include invalid_path_warnings

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates unit tests for the google-cloud-storage package. In test_fileio.py, a lambda expression was reformatted for clarity. In test_transfer_manager.py, the logic for asserting warnings was improved to filter for specific messages and provide more context upon failure. A review comment suggests further enhancing the assertion message in test_transfer_manager.py by explicitly including the expected versus actual count of matching warnings to aid in debugging.

Comment thread packages/google-cloud-storage/tests/unit/test_transfer_manager.py
@nidhiii-27 nidhiii-27 changed the title fix: test_transfer_manager counts unwanted deprecated warnings fix(storage): test_transfer_manager counts unwanted deprecated warnings Apr 21, 2026
@nidhiii-27 nidhiii-27 marked this pull request as ready for review April 21, 2026 08:34
@nidhiii-27 nidhiii-27 requested a review from a team as a code owner April 21, 2026 08:34
@parthea parthea merged commit 955a91b into main Apr 21, 2026
30 checks passed
@parthea parthea deleted the fix-transfer-manager-test branch April 21, 2026 15: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.

3 participants