Skip to content

Commit c900238

Browse files
committed
close test event_loop correctly
1 parent f0c1304 commit c900238

File tree

1 file changed

+2
-10
lines changed
  • tests/robotcode/language_server/robotframework

1 file changed

+2
-10
lines changed

tests/robotcode/language_server/robotframework/conftest.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import asyncio
2-
import logging
2+
33
from pathlib import Path
44
from typing import Any, AsyncGenerator, Generator, cast
55

@@ -30,19 +30,11 @@
3030

3131
@pytest.fixture(scope="function")
3232
def event_loop() -> Generator[asyncio.AbstractEventLoop, None, None]:
33-
logging.info("create event_loop")
3433
loop = asyncio.new_event_loop()
3534
try:
3635
yield loop
3736
finally:
38-
for t in asyncio.all_tasks(loop):
39-
logging.error(t)
40-
41-
logging.info("event_loop close")
42-
43-
# loop.close()
44-
45-
logging.info("event_loop closed")
37+
loop.close()
4638

4739

4840
@pytest.fixture(scope="function")

0 commit comments

Comments
 (0)