Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit a66b8f5

Browse files
authored
Merge pull request #55 from Integration-Automation/dev
Update test_bot.py
2 parents 71316df + b6f3193 commit a66b8f5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/unit_test/test_bot/test_bot.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,10 @@ async def test_ask() -> None:
2626

2727

2828
if __name__ == "__main__":
29-
loop = asyncio.get_event_loop()
29+
# If you are using jupyter pls use nest_asyncio apply()
30+
# apply()
31+
try:
32+
loop = asyncio.get_running_loop()
33+
except RuntimeError:
34+
loop = asyncio.get_event_loop()
3035
loop.run_until_complete(test_ask())

0 commit comments

Comments
 (0)