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

@@ -128,7 +128,7 @@ def heartbeat_ind():
msg = b'\xa5\x01\x00\x10G\x00\x01\x00\x00\x00\x00\x00Y\x15'
return msg
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_emu_init_close(my_loop, config_tsun_inv1):
_ = config_tsun_inv1
assert asyncio.get_running_loop()
@@ -137,7 +137,7 @@ async def test_emu_init_close(my_loop, config_tsun_inv1):
cld.close()
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_emu_start(my_loop, config_tsun_inv1, msg_modbus_rsp, str_test_ip, device_ind_msg):
_ = config_tsun_inv1
assert asyncio.get_running_loop()
@@ -155,7 +155,7 @@ async def test_emu_start(my_loop, config_tsun_inv1, msg_modbus_rsp, str_test_ip,
assert inv.ifc.fwd_fifo.peek() == device_ind_msg
cld.close()
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_snd_hb(my_loop, config_tsun_inv1, heartbeat_ind):
_ = config_tsun_inv1
inv = InvStream()
@@ -166,7 +166,7 @@ async def test_snd_hb(my_loop, config_tsun_inv1, heartbeat_ind):
assert cld.ifc.tx_fifo.peek() == heartbeat_ind
cld.close()
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_snd_inv_data(my_loop, config_tsun_inv1, inverter_ind_msg, inverter_rsp_msg):
_ = config_tsun_inv1
inv = InvStream()
@@ -208,7 +208,7 @@ async def test_snd_inv_data(my_loop, config_tsun_inv1, inverter_ind_msg, inverte
cld.close()
@pytest.mark.asyncio
@pytest.mark.asyncio(loop_scope="session")
async def test_rcv_invalid(my_loop, config_tsun_inv1, inverter_ind_msg, inverter_rsp_msg):
_ = config_tsun_inv1
inv = InvStream()