Update dependency pytest-asyncio to v1.2.0 (#492)

* Update dependency pytest-asyncio to v1.2.0

* don't stop the event loop between test

set the loop_scope to session for async tests

* remove loop_scope="session"

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Stefan Allius <stefan.allius@t-online.de>
This commit is contained in:
renovate[bot]
2025-09-15 22:50:47 +02:00
committed by GitHub
parent 45ab95a6b3
commit 2019037ab0
14 changed files with 181 additions and 181 deletions

View File

@@ -113,7 +113,7 @@ def patch_unhealthy_remote():
with patch.object(AsyncStreamClient, 'healthy', new_healthy) as conn:
yield conn
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_inverter_iter(my_loop):
_ = my_loop
InverterBase._registry.clear()
@@ -217,7 +217,7 @@ def test_unhealthy_remote(patch_unhealthy_remote):
cnt += 1
assert cnt == 0
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_remote_conn(my_loop, config_conn, patch_open_connection):
_ = my_loop
_ = config_conn
@@ -244,7 +244,7 @@ async def test_remote_conn(my_loop, config_conn, patch_open_connection):
cnt += 1
assert cnt == 0
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_remote_conn_to_private(my_loop, config_conn, patch_open_connection):
'''check DNS resolving of the TSUN FQDN to a local address'''
_ = my_loop
@@ -283,7 +283,7 @@ async def test_remote_conn_to_private(my_loop, config_conn, patch_open_connectio
assert cnt == 0
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_remote_conn_to_loopback(my_loop, config_conn, patch_open_connection):
'''check DNS resolving of the TSUN FQDN to the loopback address'''
_ = my_loop
@@ -321,7 +321,7 @@ async def test_remote_conn_to_loopback(my_loop, config_conn, patch_open_connecti
cnt += 1
assert cnt == 0
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_remote_conn_to_none(my_loop, config_conn, patch_open_connection):
'''check if get_extra_info() return None in case of an error'''
_ = my_loop
@@ -359,7 +359,7 @@ async def test_remote_conn_to_none(my_loop, config_conn, patch_open_connection):
cnt += 1
assert cnt == 0
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_unhealthy_remote(my_loop, config_conn, patch_open_connection, patch_unhealthy_remote):
_ = my_loop
_ = config_conn
@@ -397,7 +397,7 @@ async def test_unhealthy_remote(my_loop, config_conn, patch_open_connection, pat
cnt += 1
assert cnt == 0
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_remote_disc(my_loop, config_conn, patch_open_connection):
_ = my_loop
_ = config_conn