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

async\await tests refactor leaves warning #2409

Closed
hellysmile opened this issue Oct 26, 2017 · 6 comments
Closed

async\await tests refactor leaves warning #2409

hellysmile opened this issue Oct 26, 2017 · 6 comments
Labels

Comments

@hellysmile
Copy link
Member

Long story short

There is an warning after make test

Expected behaviour

No warning after test suite

Actual behaviour

tests/test_worker.py::test__run_ok[AsyncioWorker-pyloop]
  ***/aiohttp/test_utils.py:469: RuntimeWarning: coroutine 'GunicornWebWorker.close' was never awaited
    gc.collect()

Steps to reproduce

Run tests on master

Your environment

MacOS 10.12.6
Python 3.6.2 from pyenv

@asvetlov asvetlov added the good first issue Good for newcomers label Oct 26, 2017
@asvetlov
Copy link
Member

Any volunteer? The issue should be easy to fix.

@hellysmile
Copy link
Member Author

Current master produces even more warnings

tests/test_client_request.py::test_terminate_with_closed_loop[pyloop]
  ***/aiohttp/aiohttp/test_utils.py:448: RuntimeWarning: coroutine 'ClientRequest.write_bytes' was never awaited
    gc.collect()

tests/test_client_request.py::test_terminate_with_closed_loop[uvloop]
  ***/aiohttp/aiohttp/test_utils.py:448: RuntimeWarning: coroutine 'ClientRequest.write_bytes' was never awaited
    gc.collect()

tests/test_http_writer.py::test_write_payload_eof[pyloop]
  ***/aiohttp/tests/test_http_writer.py:45: RuntimeWarning: coroutine 'PayloadWriter.write_eof' was never awaited
    msg.write_eof()

tests/test_http_writer.py::test_write_payload_eof[uvloop]
  ***/aiohttp/tests/test_http_writer.py:45: RuntimeWarning: coroutine 'PayloadWriter.write_eof' was never awaited
    msg.write_eof()

tests/test_worker.py::test__run_ok[AsyncioWorker-pyloop]
  ***/aiohttp/aiohttp/test_utils.py:448: RuntimeWarning: coroutine 'GunicornWebWorker.close' was never awaited
    gc.collect()

@hellysmile
Copy link
Member Author

Fixed by #2449

@hellysmile
Copy link
Member Author

hellysmile commented Oct 30, 2017

Not all were fixed

tests/test_client_request.py::test_terminate_with_closed_loop[pyloop]
  ***/aiohttp/aiohttp/test_utils.py:448: RuntimeWarning: coroutine 'ClientRequest.write_bytes' was never awaited
    gc.collect()

tests/test_client_request.py::test_terminate_with_closed_loop[uvloop]
  ***/aiohttp/aiohttp/test_utils.py:448: RuntimeWarning: coroutine 'ClientRequest.write_bytes' was never awaited
    gc.collect()

tests/test_worker.py::test__run_ok[AsyncioWorker-pyloop]
  ***/aiohttp/aiohttp/test_utils.py:448: RuntimeWarning: coroutine 'GunicornWebWorker.close' was never awaited
    gc.collect()

@hellysmile hellysmile reopened this Oct 30, 2017
@eteamin
Copy link
Contributor

eteamin commented Oct 30, 2017

As far as I reviewed, write_bytes is awaited. I don't know what is wrong.

asvetlov added a commit that referenced this issue Nov 3, 2017
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants