Skip to content
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

Run tests for python 3.7 in CI and fix failing tests #378

Closed
wants to merge 3 commits into from

Conversation

caulagi
Copy link

@caulagi caulagi commented Jan 27, 2019

Related to #357 and #317. I.e., I see the following errors with Python 3.7 -

$ py.test -s -v -x ./tests/                                                                                                    1.8m  Sun Jan 27 21:24:05 2019
Test session starts (platform: darwin, Python 3.7.2, pytest 3.9.1, pytest-sugar 0.9.1)
cachedir: .pytest_cache
rootdir: /Users/pradipcaulagi/jipu/src/aiomysql, inifile:
plugins: sugar-0.9.1, cov-2.6.0

 tests/test_async_iter.py::test_async_cursor[asyncio-5.6] ✓                                                                                                                                    0%
 tests/test_async_iter.py::test_async_cursor_server_side[asyncio-5.6] ✓                                                                                                                        0% ▏

――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― test_async_iter_over_sa_result[asyncio-5.6] ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

mysql_params = {'db': 'test_pymysql', 'host': 'localhost', 'local_infile': True, 'password': '', ...}, table = None, loop = <_UnixSelectorEventLoop running=False closed=False debug=False>

    @pytest.mark.run_loop
    async def test_async_iter_over_sa_result(mysql_params, table, loop):
        ret = []
        engine = await sa.create_engine(**mysql_params, loop=loop)
        conn = await engine.acquire()

>       async for i in (await conn.execute(tbl.select())):
E       TypeError: 'async for' received an object from __aiter__ that does not implement __anext__: coroutine

tests/test_async_iter.py:61: TypeError

The fixes are based on aiopg utils.

I added running tests for python 3.7 as part of CI.

@codecov
Copy link

codecov bot commented Jan 27, 2019

Codecov Report

Merging #378 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #378      +/-   ##
==========================================
+ Coverage   92.28%   92.34%   +0.05%     
==========================================
  Files           9        9              
  Lines        1180     1189       +9     
  Branches      172      173       +1     
==========================================
+ Hits         1089     1098       +9     
  Misses         64       64              
  Partials       27       27
Impacted Files Coverage Δ
aiomysql/sa/result.py 92% <100%> (ø) ⬆️
aiomysql/utils.py 90.09% <100%> (+0.96%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 66d8657...b926d9e. Read the comment docs.

@aio-libs aio-libs deleted a comment from CLAassistant Jan 30, 2022
@Nothing4You
Copy link
Collaborator

thank you for the PR.

python 3.7 support has been implemented quite a while ago, therefore this is no longer relevant.

@Nothing4You
Copy link
Collaborator

for the SA fix, this should be covered in #494, which also includes a test case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants