pytest-dev / pytest-asyncio

Asyncio support for pytest
https://pytest-asyncio.readthedocs.io
Apache License 2.0
1.42k stars 148 forks source link

Infinite hang #353

Closed ughstudios closed 2 years ago

ughstudios commented 2 years ago
import pytest

from league_helper import session

@pytest.mark.asyncio
async def test_match_model() -> None:
    summoner_id = '24594534'
    test = await session.make_lcu_request_for_summoner_by_id(summoner_id)
    print(test)

I wrote a simple test and when I try to run it from vscode it just hangs forever. I get this output, and then nothing:

============================= test session starts =============================
platform win32 -- Python 3.9.7, pytest-7.1.2, pluggy-1.0.0
rootdir: c:\Users\pbssu\Desktop\LeagueHelper, configfile: setup.cfg
plugins: anyio-3.6.1, asyncio-0.18.3
asyncio: mode=strict
collected 1 item

tests\test_match_model.py 
ughstudios commented 2 years ago

Nevermind, this is a mistake in my code. I should have added some logging for this. There is no issue.