Skip to content

Commit b1781df

Browse files
committed
no longer support python 2.6
1 parent 66d5b28 commit b1781df

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
sudo: false
22
language: python
33
python:
4-
- '2.6'
54
- '2.7'
65
- '3.5'
76
- '3.6'

ut/test.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
SecretId=SECRET_ID,
2525
SecretKey=SECRET_KEY,
2626
)
27-
client = CosS3Client(conf)
27+
client = CosS3Client(conf, retry=3)
2828

2929

3030
def _create_test_bucket(test_bucket):
@@ -638,6 +638,18 @@ def test_list_multipart_uploads():
638638
)
639639

640640

641+
def test_upload_file_from_buffer():
642+
import io
643+
data = io.BytesIO(6*1024*1024*'A')
644+
response = client.upload_file_from_buffer(
645+
Bucket=test_bucket,
646+
Key='test_upload_from_buffer',
647+
Body=data,
648+
MaxBufferSize=5,
649+
PartSize=1
650+
)
651+
652+
641653
def test_upload_file_multithreading():
642654
"""根据文件大小自动选择分块大小,多线程并发上传提高上传速度"""
643655
file_name = "thread_1GB"

0 commit comments

Comments
 (0)