File tree Expand file tree Collapse file tree 7 files changed +59
-3
lines changed
python-sdk-functional-test Expand file tree Collapse file tree 7 files changed +59
-3
lines changed Original file line number Diff line number Diff line change 1+ version : ' 1.0.{build}'
2+
3+ environment :
4+ matrix :
5+ - PYTHON : " C:\\ Python27"
6+ - PYTHON : " C:\\ Python34"
7+ - PYTHON : " C:\\ Python35"
8+ - PYTHON : " C:\\ Python36"
9+ - PYTHON : " C:\\ Python37"
10+ - PYTHON : " C:\\ Python27-x64"
11+ - PYTHON : " C:\\ Python34-x64"
12+ DISTUTILS_USE_SDK : " 1"
13+ - PYTHON : " C:\\ Python35-x64"
14+ - PYTHON : " C:\\ Python36-x64"
15+ - PYTHON : " C:\\ Python37-x64"
16+
17+ skip_commits :
18+ files :
19+ - " *.yml"
20+ - " *.rst"
21+ - " LICENSE"
22+
23+ install :
24+ - " SET PATH=%PYTHON%;%PYTHON%\\ Scripts;%PATH%"
25+ - " %PYTHON%\\ python.exe -m pip install unittest2"
26+ - " %PYTHON%\\ python.exe -m pip install coverage"
27+ - " %PYTHON%\\ python.exe -m pip install pycodestyle"
28+ - " %PYTHON%\\ python.exe -m pip install mock"
29+ - " %PYTHON%\\ python.exe -m pip install jmespath"
30+ - " %PYTHON%\\ python.exe -m pip install pytest==3.2.5"
31+
32+ build : off
33+
34+ test_script :
35+ - " coverage run --branch -m pytest aliyun-python-sdk-core/tests/"
36+ - " %PYTHON%\\ python.exe test_all.py"
37+
Original file line number Diff line number Diff line change 11# Alibaba Cloud Python Software Development Kit
22
33[ ![ Build Status] ( https://travis-ci.org/aliyun/aliyun-openapi-python-sdk.svg?branch=master )] ( https://travis-ci.org/aliyun/aliyun-openapi-python-sdk )
4+ [ ![ Appveyor CI Build Status] ( https://ci.appveyor.com/api/projects/status/qf5svj7bfu4dvhp9?svg=true )] ( https://ci.appveyor.com/project/wallisyan/aliyun-openapi-python-sdk-qp6kf )
45[ ![ codecov] ( https://codecov.io/gh/aliyun/aliyun-openapi-python-sdk/branch/master/graph/badge.svg )] ( https://codecov.io/gh/aliyun/aliyun-openapi-python-sdk )
56
67[ 中文文档] ( ./README_zh.md )
Original file line number Diff line number Diff line change 11# 阿里云开发者 Python 工具套件
22
33[ ![ Build Status] ( https://travis-ci.org/aliyun/aliyun-openapi-python-sdk.svg?branch=master )] ( https://travis-ci.org/aliyun/aliyun-openapi-python-sdk )
4+ [ ![ Appveyor CI Build Status] ( https://ci.appveyor.com/api/projects/status/qf5svj7bfu4dvhp9?svg=true )] ( https://ci.appveyor.com/project/wallisyan/aliyun-openapi-python-sdk-qp6kf )
45[ ![ codecov] ( https://codecov.io/gh/aliyun/aliyun-openapi-python-sdk/branch/master/graph/badge.svg )] ( https://codecov.io/gh/aliyun/aliyun-openapi-python-sdk )
56
67欢迎使用阿里云开发者工具套件(SDK)。阿里云 Python SDK 让您不用复杂编程即可访问云服务器、云监控等多个阿里云服务。这里向您介绍如何获取阿里云 Python SDK 并开始调用。
Original file line number Diff line number Diff line change 22import datetime
33import json
44import sys
5- from tests import unittest
65import uuid
76
87from aliyunsdkcore .acs_exception .exceptions import ServerException
Original file line number Diff line number Diff line change 11# encoding:utf-8
22import json
33import os
4- from tests import unittest
54
65from aliyunsdkcore .acs_exception .exceptions import ClientException
76from aliyunsdkcore .acs_exception .exceptions import ServerException
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ def test_server_timeout(self):
3535 except ClientException as e :
3636 self .assertEqual ("SDK.HttpError" , e .error_code )
3737 head_message , attributes = self ._parse_complex_error_message (e .get_error_msg ())
38- self .assertEqual ("timed out" , head_message )
3938 self .assertEqual ("ecs-cn-hangzhou.aliyuncs.com" , attributes .get ("Endpoint" ))
4039 self .assertEqual ("Ecs" , attributes .get ("Product" ))
4140 self .assertTrue ("SdkCoreVersion" in attributes )
Original file line number Diff line number Diff line change 1+ import os
2+ from subprocess import check_call
3+
4+ cur_path = os .path .abspath ('.' )
5+ path_list = []
6+ for ret in os .walk (cur_path ):
7+ root_path = ret [0 ]
8+ root_path_list = root_path .split ('\\ ' )
9+ if root_path_list [- 1 ].startswith ('aliyun-python-sdk' ):
10+ path_list .append (root_path )
11+
12+ os .environ .__setitem__ ('PYTHONPATH' , ';' .join (path_list ))
13+
14+ try :
15+ check_call (
16+ "coverage run --branch -m pytest python-sdk-functional-test/" , shell = True )
17+
18+ except Exception as e :
19+ raise
20+
You can’t perform that action at this time.
0 commit comments