From 8edb8eadebebf4005b06a98bcc3f79dcd3c686fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 7 Feb 2022 02:54:01 +0100 Subject: [PATCH] python39Packages.p1monitor: enable tests, fix version number --- .../python-modules/p1monitor/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/p1monitor/default.nix b/pkgs/development/python-modules/p1monitor/default.nix index d1530c797198..af28ea45a633 100644 --- a/pkgs/development/python-modules/p1monitor/default.nix +++ b/pkgs/development/python-modules/p1monitor/default.nix @@ -1,8 +1,11 @@ { lib , aiohttp +, aresponses , buildPythonPackage , fetchFromGitHub , poetry-core +, pytest-asyncio +, pytestCheckHook , pythonOlder , yarl }: @@ -21,6 +24,12 @@ buildPythonPackage rec { sha256 = "1ciaclgq4aknldjqlqa08jcab28sbqrjxy5nqqwlnb2wlprg5ijz"; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace '"0.0.0"' '"${version}"' \ + --replace 'addopts = "--cov"' "" + ''; + nativeBuildInputs = [ poetry-core ]; @@ -30,8 +39,11 @@ buildPythonPackage rec { yarl ]; - # Project has no tests - doCheck = false; + checkInputs = [ + aresponses + pytest-asyncio + pytestCheckHook + ]; pythonImportsCheck = [ "p1monitor" ];