From f888753776bccfcc8616e400aac823c651fb83ed Mon Sep 17 00:00:00 2001 From: natsukium Date: Thu, 21 Mar 2024 21:52:50 +0900 Subject: [PATCH] python311Packages.batchspawner: enable tests --- .../python-modules/batchspawner/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/batchspawner/default.nix b/pkgs/development/python-modules/batchspawner/default.nix index 9e54f054e005..87c6aa2cafbf 100644 --- a/pkgs/development/python-modules/batchspawner/default.nix +++ b/pkgs/development/python-modules/batchspawner/default.nix @@ -6,6 +6,8 @@ , jinja2 , jupyterhub , pythonOlder +, pytest-asyncio +, pytestCheckHook }: buildPythonPackage rec { @@ -32,8 +34,15 @@ buildPythonPackage rec { jupyterhub ]; - # Tests require a job scheduler e.g. slurm, pbs, etc. - doCheck = false; + preCheck = '' + substituteInPlace pyproject.toml \ + --replace-fail "--cov=batchspawner" "" + ''; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ]; pythonImportsCheck = [ "batchspawner"