fix: sideeffects created by changing fork to spawn (#2591)

This commit is contained in:
Ryu Juheon
2022-10-28 02:39:17 +09:00
committed by GitHub
parent 6b9edfd05c
commit 1c4925edf7
5 changed files with 14 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ from sanic import Sanic
from sanic.compat import OS_IS_WINDOWS
from sanic.config import Config
from sanic.exceptions import SanicException
from sanic.helpers import _default
from sanic.helpers import Default
from sanic.log import LOGGING_CONFIG_DEFAULTS
from sanic.response import text
from sanic.router import Route
@@ -497,7 +497,9 @@ def test_uvloop_cannot_never_called_with_create_server(caplog, monkeypatch):
)
counter = Counter([(r[1], r[2]) for r in caplog.record_tuples])
modified = sum(1 for app in apps if app.config.USE_UVLOOP is not _default)
modified = sum(
1 for app in apps if not isinstance(app.config.USE_UVLOOP, Default)
)
assert counter[(logging.WARNING, message)] == modified