Skip to content

Commit f3fdc3e

Browse files
authored
Update solipsism (#12)
Update solipsism to latest version and use modern way to replace event loop
2 parents e0cccf2 + 846137d commit f3fdc3e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ dev-pytest = [
8888
"frequenz-repo-config[extra-lint-examples] == 0.9.1",
8989
"pytest-mock == 3.12.0",
9090
"pytest-asyncio == 0.23.5",
91-
"async-solipsism == 0.5",
91+
"async-solipsism == 0.6",
9292
"time-machine == 2.14.0",
9393
]
9494
dev = [

tests/test_frequenz_dispatch.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@
2424

2525

2626
# This method replaces the event loop for all tests in the file.
27-
@fixture(scope="module")
28-
def event_loop() -> Iterator[async_solipsism.EventLoop]:
29-
"""Replace the loop with one that doesn't interact with the outside world."""
30-
loop = async_solipsism.EventLoop()
31-
yield loop
32-
loop.close()
27+
@fixture
28+
def event_loop_policy() -> async_solipsism.EventLoopPolicy:
29+
"""Return an event loop policy that uses the async solipsism event loop."""
30+
return async_solipsism.EventLoopPolicy()
3331

3432

3533
@fixture

0 commit comments

Comments
 (0)