From b8c0d17f95970926a1a73b79faea8c2beb22990f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 17 Jul 2022 16:40:45 +0200 Subject: [PATCH] python310Packages.pylama: move tests to passthru --- .../python-modules/pylama/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pylama/default.nix b/pkgs/development/python-modules/pylama/default.nix index 0289b2462136..be3854d1352e 100644 --- a/pkgs/development/python-modules/pylama/default.nix +++ b/pkgs/development/python-modules/pylama/default.nix @@ -15,7 +15,7 @@ , pytestCheckHook }: -buildPythonPackage rec { +let pylama = buildPythonPackage rec { pname = "pylama"; version = "8.3.8"; @@ -46,13 +46,11 @@ buildPythonPackage rec { vulture ]; + # escape infinite recursion pylint -> isort -> pylama + doCheck = false; + checkInputs = [ - # avoid infinite recursion pylint -> isort -> pylama - (pylint.override { - isort = isort.overridePythonAttrs (old: { - doCheck = false; - }); - }) + pylint pytestCheckHook ]; @@ -69,6 +67,10 @@ buildPythonPackage rec { "pylama.main" ]; + passthru.tests = { + check = pylama.overridePythonAttrs (_: { doCheck = true; }); + }; + meta = with lib; { description = "Code audit tool for python"; homepage = "https://github.com/klen/pylama"; @@ -76,4 +78,4 @@ buildPythonPackage rec { license = licenses.mit; maintainers = with maintainers; [ dotlambda ]; }; -} +}; in pylama