From c44af1ebd72958cf2c99d30fdea31860752dcb52 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Oct 2020 18:13:47 +0100 Subject: [PATCH] python3Packages.asgi-csrf: disable tests The packages tests import a private module from httpx, that does not exist anymore in newer versions. --- .../python-modules/asgi-csrf/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/asgi-csrf/default.nix b/pkgs/development/python-modules/asgi-csrf/default.nix index 12c94aee1573..257e7314af9e 100644 --- a/pkgs/development/python-modules/asgi-csrf/default.nix +++ b/pkgs/development/python-modules/asgi-csrf/default.nix @@ -1,5 +1,5 @@ { stdenv, buildPythonPackage, isPy27, fetchFromGitHub, itsdangerous, python-multipart -, pytest, starlette, httpx, pytest-asyncio }: +, pytestCheckHook, starlette, httpx, pytest-asyncio }: buildPythonPackage rec { version = "0.7"; @@ -14,12 +14,23 @@ buildPythonPackage rec { sha256 = "1vf4lh007790836cp3hd6wf8wsgj045dcg0w1cm335p08zz6j4k7"; }; - propagatedBuildInputs = [ itsdangerous python-multipart ]; + propagatedBuildInputs = [ + itsdangerous + python-multipart + ]; + + checkInputs = [ + httpx + pytest-asyncio + pytestCheckHook + starlette + ]; + + # tests fail while importing a private module from httpx + # E ModuleNotFoundError: No module named 'httpx._content_streams' + # https://github.com/simonw/asgi-csrf/issues/18 + doCheck = false; - checkInputs = [ pytest starlette httpx pytest-asyncio ]; - checkPhase = '' - pytest test_asgi_csrf.py - ''; pythonImportsCheck = [ "asgi_csrf" ]; meta = with stdenv.lib; {