tldr: use pytestCheckHook (#484660)

This commit is contained in:
kirillrdy
2026-01-28 08:47:36 +00:00
committed by GitHub
+7 -10
View File
@@ -1,9 +1,9 @@
{
stdenv,
lib,
stdenv,
python3Packages,
fetchFromGitHub,
installShellFiles,
python3Packages,
}:
python3Packages.buildPythonApplication (finalAttrs: {
@@ -30,16 +30,13 @@ python3Packages.buildPythonApplication (finalAttrs: {
nativeBuildInputs = [ installShellFiles ];
nativeCheckInputs = with python3Packages; [
pytest
pytestCheckHook
];
checkPhase = ''
runHook preCheck
pytest -k 'not test_error_message'
runHook postCheck
'';
doCheck = true;
disabledTests = [
# Requires internet access
"test_error_message"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tldr \