Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/google-cloud-storage/tests/unit/test_fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@ def test_write(self, mock_warn):

# The transmit_next_chunk method must actually consume bytes from the
# sliding buffer for the flush() feature to work properly.
upload.transmit_next_chunk.side_effect = (
lambda _: unwrapped_writer._buffer.read(chunk_size)
upload.transmit_next_chunk.side_effect = lambda _: (
unwrapped_writer._buffer.read(chunk_size)
)

# Write under chunk_size. This should be buffered and the upload not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,17 @@ def test_download_many_to_path_raises_invalid_path_error():
skip_if_exists=True,
)

assert len(w) == 1
assert "will **NOT** be downloaded" in str(w[0].message)
invalid_path_warnings = [
warning
for warning in w
if str(warning.message).startswith("The blob ")
and "will **NOT** be downloaded" in str(warning.message)
]

assert len(invalid_path_warnings) == 1, "---".join(
[str(warning.message) for warning in w]
)
Comment thread
nidhiii-27 marked this conversation as resolved.

assert len(results) == 1
assert isinstance(results[0], UserWarning)

Expand Down
Loading