From 9e599dd814bed88055b60fe65a26da8a3ad97c1f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Jan 2021 12:14:37 +0100 Subject: [PATCH] python3Packages.canmatrix: switch to pytestCheckHook --- .../python-modules/canmatrix/default.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/canmatrix/default.nix b/pkgs/development/python-modules/canmatrix/default.nix index 2004e3682853..8ffacc1a99de 100644 --- a/pkgs/development/python-modules/canmatrix/default.nix +++ b/pkgs/development/python-modules/canmatrix/default.nix @@ -13,7 +13,7 @@ , xlrd , XlsxWriter , pyyaml -, pytest +, pytestCheckHook }: buildPythonPackage rec { @@ -48,14 +48,11 @@ buildPythonPackage rec { --replace "version = versioneer.get_version()" "version = \"${version}\"" ''; - checkInputs = [ - pytest - ]; - + checkInputs = [ pytestCheckHook ]; # long_envvar_name_imports requires stable key value pair ordering - checkPhase = '' - pytest -s src/canmatrix -k 'not long_envvar_name_imports' - ''; + pytestFlagsArray = [ "-s src/canmatrix" ]; + disabledTests = [ "long_envvar_name_imports" ]; + pythonImportsCheck = [ "canmatrix" ]; meta = with lib; { homepage = "https://github.com/ebroecker/canmatrix";