Merge branch 'main' into zhiwei/bp-copy

This commit is contained in:
Zhiwei
2021-07-08 11:42:30 -07:00
committed by GitHub
5 changed files with 23 additions and 64 deletions

View File

@@ -13,7 +13,7 @@ from sanic.exceptions import PyFileError
@contextmanager
def temp_path():
""" a simple cross platform replacement for NamedTemporaryFile """
"""a simple cross platform replacement for NamedTemporaryFile"""
with TemporaryDirectory() as td:
yield Path(td, "file")

View File

@@ -111,7 +111,7 @@ def test_logging_pass_customer_logconfig():
),
)
def test_log_connection_lost(app, debug, monkeypatch):
""" Should not log Connection lost exception on non debug """
"""Should not log Connection lost exception on non debug"""
stream = StringIO()
error = logging.getLogger("sanic.error")
error.addHandler(logging.StreamHandler(stream))