-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[python-asyncio] tests and fixes #7235
[python-asyncio] tests and fixes #7235
Conversation
envlist = py27, py3 | ||
{{/asyncio}} | ||
{{#asyncio}} | ||
envlist = py3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
asyncio
with coroutine function definition requires Python 3.5+. I also switched from nosetest
to pytest
which supports asyncio.
Tests failed because Travis hasn't got Python 3.5+. Our Travis configuration is for Java and I'm not sure if it's possible to install other language. Do you know how I can configure it ? |
The changes look good to me. I vote for using pytest for all the types of the client. Any objectives? I have no idea about Travis setup, so I cannot help here. |
It should be possible to update to a newer version of Python. I'll check later after 2.3.0 release. |
+1 for pytest as well. There's an asyncio pytest plugin that we could use: https://pypi.python.org/pypi/pytest-asyncio But I'm fine with the unit tests as is too, in the interest of just getting some form of coverage on these for now. |
@toumorokoshi Thanks for your feedback. Coverage is not very bad ;)
|
@wing328 I'll be glad if you find time to help me with Travis here. |
@tomplus I'll give it a try over the coming weekend. Will keep you posted. |
According to https://docs.travis-ci.com/user/build-environment-updates/2017-12-12/, it should be running Python 3.6.3 but seems like it's not the case. I've contacted Travis support to look into this. |
Got the reply from Travis support and I was able to get the tests passed with 3.6.3 (not 3.5.x). If this is ok, I'll merge this PR by tomorrow (Wednesday) |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.3.0.0
branch for changes related to OpenAPI spec 3.0. Default:master
.Description of the PR
I prepared some fixes (creating ssl context, sending queries with args, forms or files) and added some tests for python-asyncio.
PTAL: @wing328 @taxpon @frol @mbohlool @cbornet @kenjones-cisco @toumorokoshi