diff --git a/pkgs/development/python-modules/sanic/default.nix b/pkgs/development/python-modules/sanic/default.nix index 1ec5ab87d83c..660ca5de80bf 100644 --- a/pkgs/development/python-modules/sanic/default.nix +++ b/pkgs/development/python-modules/sanic/default.nix @@ -73,9 +73,24 @@ buildPythonPackage rec { preCheck = '' # Some tests depends on sanic on PATH PATH="$out/bin:$PATH" + PYTHONPATH=$PWD:$PYTHONPATH + + # needed for relative paths for some packages + cd tests ''; + # uvloop usage is buggy + #SANIC_NO_UVLOOP = true; + + pytestFlagsArray = [ + "--asyncio-mode=auto" + ]; + disabledTests = [ + # Lack of uvloop setup through fixtures + "test_create_asyncio_server" + "test_listeners_triggered_async" + "test_tls_options" # Tests are flaky "test_keep_alive_client_timeout" "test_check_timeouts_request_timeout" @@ -103,6 +118,14 @@ buildPythonPackage rec { "test_version" ]; + disabledTestPaths = [ + # unable to create async loop + "test_app.py" + "test_asgi.py" + # occasionally hangs + "test_multiprocessing.py" + ]; + # avoid usage of nixpkgs-review in darwin since tests will compete usage # for the same local port __darwinAllowLocalNetworking = true;