@@ -74,8 +74,8 @@ def test_calculate_parts_medium_file(self, manager):
7474 file_size = 500 * 1024 * 1024 # 500MB
7575 part_size , num_parts = manager ._calculate_parts (file_size )
7676
77- expected_parts = 5 # 500MB / 100MB = 5 parts
78- expected_part_size = 100 * 1024 * 1024 # 100MB
77+ expected_parts = 2 # 500MB / 250MB = 2 parts
78+ expected_part_size = 250 * 1024 * 1024 # 250MB
7979
8080 assert num_parts == expected_parts
8181 assert part_size == expected_part_size
@@ -85,10 +85,11 @@ def test_calculate_parts_large_file(self, manager):
8585 file_size = 50 * 1024 * 1024 * 1024 # 50GB
8686 part_size , num_parts = manager ._calculate_parts (file_size )
8787
88- # Should use maximum parts and scale part size
89- assert num_parts == MAX_MULTIPART_PARTS # 250
90- expected_part_size = file_size // MAX_MULTIPART_PARTS
91- assert part_size >= expected_part_size
88+ # With 250MB target part size, 50GB should use ~205 parts
89+ expected_parts = 205 # 50GB / 250MB ≈ 205 parts
90+ assert num_parts == expected_parts
91+ # Part size should be close to target (within rounding)
92+ assert part_size >= 249 * 1024 * 1024 # At least 249MB (allowing for rounding)
9293
9394 def test_calculate_parts_respects_minimum_part_size (self , manager ):
9495 """Test that minimum part size is respected"""
@@ -303,15 +304,15 @@ def test_upload_parts_concurrent(self, mock_open, mock_executor_class, manager):
303304 def test_file_size_exceeds_limit_raises_error (self , mock_stat , manager ):
304305 """Test that files exceeding size limit raise FileTypeError with clear message"""
305306 # Setup - file size over limit
306- file_size = int ((MAX_FILE_SIZE_GB + 1 ) * NUM_BYTES_IN_GB ) # 26GB
307+ file_size = int ((MAX_FILE_SIZE_GB + 1 ) * NUM_BYTES_IN_GB ) # 51.1GB
307308 mock_stat .return_value .st_size = file_size
308309
309310 # Should raise FileTypeError with descriptive message
310311 with pytest .raises (FileTypeError ) as exc_info :
311312 manager .upload ("test-url" , Path ("test.jsonl" ), FilePurpose .FineTune )
312313
313314 error_message = str (exc_info .value )
314- assert "26.0GB exceeds maximum supported size of 25.0GB " in error_message
315+ assert "51.1GB exceeds maximum supported size of 50.1GB " in error_message
315316
316317 @patch .object (MultipartUploadManager , "_initiate_upload" )
317318 @patch .object (MultipartUploadManager , "_upload_parts_concurrent" )
0 commit comments