This repository was archived by the owner on Mar 31, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717import pytest
1818
19+ from google .cloud .storage .fileio import CHUNK_SIZE_MULTIPLE
1920from .test_blob import _check_blob_hash
2021
2122
@@ -98,9 +99,9 @@ def test_blobwriter_exit(
9899
99100 # unhandled exceptions should cancel the upload
100101 with pytest .raises (ValueError , match = "SIGTERM received" ):
101- with blob .open ("wb" ) as writer :
102+ with blob .open ("wb" , chunksize = CHUNK_SIZE_MULTIPLE ) as writer :
102103 writer .write (b"first chunk" ) # not yet uploaded
103- writer .write (b"big chunk" * 1024 ** 8 ) # uploaded
104+ writer .write (bytes ( CHUNK_SIZE_MULTIPLE ) ) # uploaded
104105 raise ValueError ("SIGTERM received" ) # upload is cancelled in __exit__
105106 # blob should not exist
106107 assert not blob .exists ()
You can’t perform that action at this time.
0 commit comments