Skip to content

Commit aa01c83

Browse files
committed
fix failed test
1 parent e23939f commit aa01c83

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

gino/ext/starlette.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import typing
2-
31
# noinspection PyPackageRequirements
42
from starlette.applications import Starlette
5-
from starlette.types import ASGIApp, Message, Receive, Scope, Send
3+
# noinspection PyPackageRequirements
4+
from starlette.types import Message, Receive, Scope, Send
65
# noinspection PyPackageRequirements
76
from starlette.exceptions import HTTPException
87
# noinspection PyPackageRequirements

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)