Skip to content

Commit 7c8e8f3

Browse files
wwwjfyfantix
authored andcommitted
fix failed test
1 parent cadf22b commit 7c8e8f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_sanic.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import asyncio
2+
13
from async_generator import yield_, async_generator
24
import pytest
35
import sanic
@@ -11,6 +13,11 @@
1113
_MAX_INACTIVE_CONNECTION_LIFETIME = 59.0
1214

1315

16+
def teardown_module():
17+
# sanic server will close the loop during shutdown
18+
asyncio.set_event_loop(asyncio.new_event_loop())
19+
20+
1421
# noinspection PyShadowingNames
1522
async def _app(config):
1623
app = sanic.Sanic()

0 commit comments

Comments
 (0)