-
Notifications
You must be signed in to change notification settings - Fork 59
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
Testing with aiodocker #106
Conversation
* Let the container run in the non-interactive mode and uses slightly less disk space. * Update/add .gitignore and .dockerignore to exclude a local virutalenv if exists.
* All tests passes in my local environment. * Now it uses aiodocker to interact with the docker daemon. * With async-generator fixtures, we can simplify fixtures a lot. - Let docker assign unused TCP ports and the server fixtures read it. - Use the event loop policy interface instead event loop implementations for different event loop types. * Update Makefile to auto-remove test containers and "docker_clean" command only removes aioodbc-related containers. - As there is no docker volumes created, so removed volume clean-up command in Makefile.
* Travis CI's docker version does not support it, and its saves only about ~10 MB.
* Changes references to Python version 3.5 to 3.6.
Looks nice! Will also try locally tonight.
|
@jettify Not yet, but it's possible to upgrade the default docker daemon provided in Travis CI. I think API v1.24 and v1.26 are almost compatible, as Docker increments the API version upon nearly every release with minor/no changes in existing APIs. |
setup.py
Outdated
@@ -8,8 +8,8 @@ | |||
|
|||
PY_VER = sys.version_info | |||
|
|||
if not PY_VER >= (3, 5): | |||
raise RuntimeError("aioodbc doesn't support Python earlier than 3.5") | |||
if not PY_VER >= (3, 6): |
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.
I do not think this necessary, 3.5 works fine, we just test library with 3.6 on each PR
No big difference for us, newer better |
tests/conftest.py
Outdated
|
||
|
||
@pytest.fixture(scope='session') | ||
async def docker(event_loop): |
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.
There is not reason to rename loop everywhere, just create alias
@pytest.fixture
def loop(event_loop):
return event_loop
* Instead, added a note to README about that testing requires Python 3.6+.
Just a note: feel free to "squash" all my dirty commits. ;) |
@@ -56,6 +57,7 @@ def read_version(): | |||
download_url='https://pypi.python.org/pypi/aioodbc', | |||
license='Apache 2', | |||
packages=find_packages(), | |||
python_requires='>=3.5', |
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.
did not know about this option, thanks!
Good job! Thanks a lot! |
refs aio-libs/aiodocker#21.