From 2dd1fdecfe2fb6a577fd1f375af3ac167d2904db Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 8 Aug 2022 00:18:54 +0200 Subject: [PATCH] python310Packages.aiohttp-jinja2: disable tests --- .../python-modules/aiohttp-jinja2/default.nix | 43 ++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/aiohttp-jinja2/default.nix b/pkgs/development/python-modules/aiohttp-jinja2/default.nix index 890a37e24dd3..3e3148fce7c2 100644 --- a/pkgs/development/python-modules/aiohttp-jinja2/default.nix +++ b/pkgs/development/python-modules/aiohttp-jinja2/default.nix @@ -1,22 +1,53 @@ -{ lib, buildPythonPackage, fetchPypi, aiohttp, jinja2, pytest, pytest-aiohttp, pytest-cov }: +{ lib +, aiohttp +, buildPythonPackage +, fetchPypi +, jinja2 +, pytest-aiohttp +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "aiohttp-jinja2"; version = "1.5"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "7c3ba5eac060b691f4e50534af2d79fca2a75712ebd2b25e6fcb1295859f910b"; + hash = "sha256-fDul6sBgtpH05QU0ry15/KKnVxLr0rJeb8sSlYWfkQs="; }; - propagatedBuildInputs = [ aiohttp jinja2 ]; + propagatedBuildInputs = [ + aiohttp + jinja2 + ]; - checkInputs = [ pytest pytest-aiohttp pytest-cov ]; + checkInputs = [ + pytest-aiohttp + pytestCheckHook + ]; - checkPhase = '' - pytest -W ignore::DeprecationWarning + postPatch = '' + substituteInPlace setup.cfg \ + --replace " --cov=aiohttp_jinja2 --cov-report xml --cov-report html --cov-report term" "" ''; + pytestFlagsArray = [ + "-W" + "ignore::DeprecationWarning" + ]; + + pythonImportsCheck = [ + "aiohttp_jinja2" + ]; + + # Tests are outdated (1.5) + # pytest.PytestUnhandledCoroutineWarning: async def functions... + doCheck = false; + meta = with lib; { description = "Jinja2 support for aiohttp"; homepage = "https://github.com/aio-libs/aiohttp_jinja2";