FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix: Add regression test for range read retry issue and bump dependency to fix by andrewsg · Pull Request #1338 · googleapis/python-storage · GitHub

This repository was archived by the owner on Mar 31, 2026. It is now read-only.
/ python-storage Public archive
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) All 1 file type selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 1 addition & 1 deletion setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"google-auth >= 2.26.1, < 3.0dev",
"google-api-core >= 2.15.0, <3.0.0dev",
"google-cloud-core >= 2.3.0, < 3.0dev",
"google-resumable-media >= 2.6.0",
"google-resumable-media >= 2.7.2",
"requests >= 2.18.0, < 3.0.0dev",
"google-crc32c >= 1.0, < 2.0dev",
]
Expand Down
13 changes: 13 additions & 0 deletions tests/conformance/test_conformance.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ def blob_download_to_filename_chunked(client, _preconditions, **resources):
assert stored_contents == data


def blob_download_to_filename_range(client, _preconditions, **resources):
bucket = resources.get("bucket")
file, data = resources.get("file_data")
blob = client.bucket(bucket.name).blob(file.name)
with tempfile.NamedTemporaryFile() as temp_f:
blob.download_to_filename(temp_f.name, start=1024, end=512 * 1024)
with open(temp_f.name, "r") as file_obj:
stored_contents = file_obj.read()
assert stored_contents == data[1024 : 512 * 1024 + 1]


def client_download_blob_to_file(client, _preconditions, **resources):
bucket = resources.get("bucket")
file, data = resources.get("file_data")
Expand Down Expand Up @@ -748,6 +759,7 @@ def object_acl_clear(client, _preconditions, **resources):
client_download_blob_to_file,
blob_download_to_filename,
blob_download_to_filename_chunked,
blob_download_to_filename_range,
blob_download_as_bytes,
blob_download_as_text,
blobreader_read,
Expand All @@ -756,6 +768,7 @@ def object_acl_clear(client, _preconditions, **resources):
client_download_blob_to_file,
blob_download_to_filename,
blob_download_to_filename_chunked,
blob_download_to_filename_range,
blob_download_as_bytes,
blob_download_as_text,
blobreader_read,
Expand Down

Back | FazBrowse Home | New Git URL