From b86abf8880439b9dc059bbb79540767e1177060a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 3 Jan 2023 17:42:22 +0100 Subject: [PATCH] python3Packages.sanic: Update disabled tests, cleanup --- .../python-modules/sanic/default.nix | 55 ++++++++----------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index 36c20604852..22d6d177719 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -9,13 +9,12 @@ , httptools , multidict , pytest-asyncio -, pytest-benchmark -, pytest-sugar -, pytestCheckHook + ,pytestCheckHook , pythonOlder , pythonAtLeast , sanic-routing , sanic-testing +, setuptools , ujson , uvicorn , uvloop @@ -26,7 +25,7 @@ buildPythonPackage rec { pname = "sanic"; version = "22.12.0"; - format = "setuptools"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -37,6 +36,10 @@ buildPythonPackage rec { hash = "sha256-Vj780rP5rJ+YsMWlb3BR9LTKT/nTt0C2H3J0X9sysj8="; }; + nativeBuildInputs = [ + setuptools + ]; + propagatedBuildInputs = [ aiofiles aioquic @@ -76,44 +79,34 @@ buildPythonPackage rec { pytestFlagsArray = [ "--asyncio-mode=auto" + "-vvv" ]; disabledTests = [ # Require networking "test_full_message" - # Fails to parse cmdline arguments - "test_dev" - "test_auto_reload" - "test_host_port_ipv6_loopback" + # Server mode mismatch (debug vs production) "test_num_workers" - "test_debug" - "test_access_logs" - "test_noisy_exceptions" - # OSError: foo - "test_bad_headers" - "test_create_server_trigger_events" - "test_json_body_requests" - "test_missing_startup_raises_exception" - "test_no_body_requests" - "test_oserror_warning" - "test_running_multiple_offset_warning" - "test_streaming_body_requests" - "test_trigger_before_events_create_server" - "test_keep_alive_connection_context" # Racy tests "test_keep_alive_client_timeout" "test_keep_alive_server_timeout" "test_zero_downtime" - # TLS tests - "test_missing_sni" - "test_no_matching_cert" - "test_wildcards" - # They thtow execptions + # sanic.exceptions.SanicException: Cannot setup Sanic Simple Server without a path to a directory "test_load_app_simple" - "worker/test_loader.py" - # broke with ujson 5.4 upgrade - # https://github.com/sanic-org/sanic/pull/2504 - "test_json_response_json" + # create defunct python processes + "test_reloader_live" + "test_reloader_live_with_dir" + "test_reload_listeners" + # crash the python interpreter + "test_host_port_localhost" + "test_host_port" + "test_server_run" + # NoneType object is not subscriptable + "test_serve_app_implicit" + # AssertionError: assert [] == ['Restarting a process', 'Begin restart termination', 'Starting a process'] + "test_default_reload_shutdown_order" + # App not found. + "test_input_is_dir" ]; disabledTestPaths = [