diff --git a/tests/test_config.py b/tests/test_config.py index 2208780d1..e3595ce14 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -118,7 +118,7 @@ def test_log_config_inifile(ini_log_config): @pytest.mark.parametrize("log_lvl_passed", log_lvl_passed) -def test_log_level(log_lvl_passed,): +def test_log_level_set_as_str_or_int(log_lvl_passed,): config = Config(app=asgi_app, log_level=log_lvl_passed) config.load() assert config.log_level == log_lvl_passed @@ -146,8 +146,8 @@ def test_should_reload_property(): @pytest.mark.skipif( - sys.platform.startswith("win"), - reason="Skipping unix domain socket test on Windows and pypy", + sys.platform.startswith("win") or platform.python_implementation() == "PyPy", + reason="Skipping unix domain tests on Windows and PyPy", ) def test_config_unix_domain_socket(tmp_path): uds = tmp_path / "socket" @@ -157,7 +157,8 @@ def test_config_unix_domain_socket(tmp_path): @pytest.mark.skipif( - sys.platform.startswith("win"), reason="Skipping file descriptor test on Windows" + sys.platform.startswith("win") or platform.python_implementation() == "PyPy", + reason="Skipping file descriptor tests on Windows and PyPy", ) def test_config_file_descriptor(): config = Config(app=asgi_app, fd=1) @@ -167,7 +168,7 @@ def test_config_file_descriptor(): @pytest.mark.skipif( sys.platform.startswith("win") or platform.python_implementation() == "PyPy", - reason="Skipping uds test on Windows", + reason="Skipping unix domain tests on Windows and PyPy", ) def test_config_rebind_socket(): sock = socket.socket() diff --git a/uvicorn/supervisors/watchdogreload.py b/uvicorn/supervisors/watchdogreload.py new file mode 100644 index 000000000..e69de29bb diff --git a/uvicorn/workers.py b/uvicorn/workers.py index 6d5641c7d..ff944d970 100644 --- a/uvicorn/workers.py +++ b/uvicorn/workers.py @@ -2,6 +2,7 @@ import logging from gunicorn.workers.base import Worker + from uvicorn.config import Config from uvicorn.main import Server