Skip to content

Commit e4f68b2

Browse files
committed
Test PR
1 parent 80f5a24 commit e4f68b2

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
strategy:
1616
max-parallel: 4
1717
matrix:
18-
python-version: [2.7, 3.6, 3.7]
19-
os: [ubuntu-latest, windows-latest]
18+
python-version: [3.7]
19+
os: [windows-latest]
2020

2121
steps:
2222
- uses: actions/checkout@v1

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,6 @@ The full API Reference is available here.
204204
[![PYPI](https://img.shields.io/pypi/v/minio.svg)](https://pypi.python.org/pypi/minio)
205205
[![Build Status](https://travis-ci.org/minio/minio-py.svg)](https://travis-ci.org/minio/minio-py)
206206
[![Build status](https://ci.appveyor.com/api/projects/status/1d05e6nvxcelmrak?svg=true)](https://ci.appveyor.com/project/harshavardhana/minio-py)
207+
208+
209+

tests/functional/tests.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import io
2323
import csv
2424
import sys
25+
import tempfile
2526

2627
from sys import exit
2728
import uuid
@@ -895,22 +896,25 @@ def test_fget_object(client, log_output, sse=None):
895896
# default value for log_output.function attribute is;
896897
# log_output.function = "fget_object(bucket_name, object_name, file_path, request_headers)"
897898

899+
tmpfd, tmpfile = tempfile.mkstemp()
900+
os.close(tmpfd)
901+
898902
# Get a unique bucket_name and object_name
899903
log_output.args['bucket_name'] = bucket_name = generate_bucket_name()
900904
log_output.args['object_name'] = object_name = uuid.uuid4().__str__()
901-
log_output.args['file_path'] = newfile_f = 'newfile-f 新'
905+
log_output.args['file_path'] = tmpfile
902906
try:
903907
MB_1 = 1024*1024 # 1MiB.
904908
MB_1_reader = LimitedRandomReader(MB_1)
905909
client.make_bucket(bucket_name)
906910
client.put_object(bucket_name, object_name, MB_1_reader, MB_1, sse=sse)
907911
# Get/Download a full object and save locally at path
908-
client.fget_object(bucket_name, object_name, newfile_f, sse=sse)
912+
client.fget_object(bucket_name, object_name, tmpfile, sse=sse)
909913
except Exception as err:
910914
raise Exception(err)
911915
finally:
912916
try:
913-
os.remove(newfile_f)
917+
os.remove(tmpfile)
914918
client.remove_object(bucket_name, object_name)
915919
client.remove_bucket(bucket_name)
916920
except Exception as err:
@@ -1877,6 +1881,7 @@ def main():
18771881
Functional testing of minio python library.
18781882
"""
18791883

1884+
18801885
try:
18811886
access_key = os.getenv('ACCESS_KEY', 'Q3AM3UQ867SPQQA43P2F')
18821887
secret_key = os.getenv('SECRET_KEY',

0 commit comments

Comments
 (0)