Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/test_dongleless_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _patch(monkeypatch, reg):


def _run(coro):
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


def test_single_dongle_removes_orphan(monkeypatch):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ota_snapshot_suppression.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def _run(coro):
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


def test_request_snapshot_suppressed_during_ota(coordinator, monkeypatch):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_reclaim_suffixed_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _patch(monkeypatch, reg):


def _run(coro):
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


def test_shape_b_base_free_renames_down(monkeypatch):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_recovery_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def _run(coro):
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


def _prep(coordinator, monkeypatch):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_restore_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_restore_reenables_disabled(monkeypatch):
migration = _install_er(monkeypatch, reg, entries)

import asyncio
n = asyncio.get_event_loop().run_until_complete(
n = asyncio.run(
migration.async_restore_entities(MagicMock(), _Entry(), ["disabled:sensor.b"]))
assert n == 1
assert reg.async_get("sensor.b").disabled_by is None
Expand All @@ -102,7 +102,7 @@ def test_restore_purges_deleted(monkeypatch):
migration = _install_er(monkeypatch, reg, [])

import asyncio
n = asyncio.get_event_loop().run_until_complete(
n = asyncio.run(
migration.async_restore_entities(MagicMock(), _Entry(), ["deleted:sensor.gone"]))
assert n == 1
assert "sensor.gone" not in reg.deleted_entities # record cleared
Expand All @@ -113,7 +113,7 @@ def test_restore_ignores_unknown_keys(monkeypatch):
reg = _FakeRegistry([], {})
migration = _install_er(monkeypatch, reg, [])
import asyncio
n = asyncio.get_event_loop().run_until_complete(
n = asyncio.run(
migration.async_restore_entities(MagicMock(), _Entry(),
["deleted:sensor.nope", "bogus", "disabled:"]))
assert n == 0
2 changes: 1 addition & 1 deletion tests/test_self_write_dedup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

def _run(coro):
import asyncio
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


def _prep(coordinator, monkeypatch, entity_type="number"):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_snapshot_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


def _run(coro):
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


@pytest.fixture(autouse=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_startup_gate_failsafe.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def _run(coro):
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


def _make_msg(topic, payload):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_unified_topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

def _run(coro):
"""Tiny event-loop runner so each test can call async process_message."""
return asyncio.get_event_loop().run_until_complete(coro)
return asyncio.run(coro)


@pytest.fixture(autouse=True)
Expand Down
Loading