Skip to content

Commit 285f2e2

Browse files
committed
reverse sleep position
1 parent 9820c86 commit 285f2e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_asgi/test_middleware.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ruff: noqa: S701
22
import asyncio
3+
import os
34
from pathlib import Path
45

56
import pytest
@@ -77,11 +78,13 @@ def Stub():
7778
async with DisplayFixture(backend=server) as new_display:
7879
await new_display.show(Stub)
7980

81+
# Wait for the log record to be popualted
8082
for _ in range(10):
81-
await asyncio.sleep(0.25)
8283
if len(server.log_records) > 0:
8384
break
85+
await asyncio.sleep(0.25)
8486

87+
# Check that the log record was populated with the "unregistered component" message
8588
assert (
8689
"Attempting to use an unregistered root component"
8790
in server.log_records[-1].message

0 commit comments

Comments
 (0)