-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hi!
I use Blueprint groups, it was ok when I used sanic 20.x with pytest-sanic 1.7.0.
But when I upgraded, I encountered the following:
@pytest.fixture
def test_cli(loop, app, sanic_client):
> return loop.run_until_complete(sanic_client(app))
tests/api/base.py:21:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
uvloop/loop.pyx:1456: in uvloop.loop.Loop.run_until_complete
???
.venv/lib/python3.8/site-packages/pytest_sanic/plugin.py:203: in create_client
await client.start_server()
.venv/lib/python3.8/site-packages/pytest_sanic/utils.py:227: in start_server
await self._server.start_server()
.venv/lib/python3.8/site-packages/pytest_sanic/utils.py:104: in start_server
await trigger_events(self.before_server_start, self.loop)
.venv/lib/python3.8/site-packages/pytest_sanic/utils.py:30: in trigger_events
await result
.venv/lib/python3.8/site-packages/sanic/app.py:1285: in finalize
raise e # noqa
.venv/lib/python3.8/site-packages/sanic/app.py:1280: in finalize
app.router.finalize()
.venv/lib/python3.8/site-packages/sanic/router.py:179: in finalize
super().finalize(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sanic.router.Router object at 0x112b83b20>, do_compile = True
def finalize(self, do_compile: bool = True):
if self.finalized:
> raise FinalizationError("Cannot finalize router more than once.")
E sanic_routing.exceptions.FinalizationError: Cannot finalize router more than once.
0xD09CD196D188D0B0, michel-rodrigues and Cayke
Metadata
Metadata
Assignees
Labels
No labels