diff --git a/setup.py b/setup.py index 3f80b2ffa..bcb839106 100644 --- a/setup.py +++ b/setup.py @@ -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", ] diff --git a/tests/conformance/test_conformance.py b/tests/conformance/test_conformance.py index 4d16fc36f..45c0cb51e 100644 --- a/tests/conformance/test_conformance.py +++ b/tests/conformance/test_conformance.py @@ -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") @@ -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, @@ -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,