python3Packages.dbf: use pytestCheckHook

This commit is contained in:
Harinn
2026-07-15 19:19:19 +07:00
parent 2fb12d0511
commit 958b882e67
@@ -4,6 +4,7 @@
buildPythonPackage,
setuptools,
aenum,
pytestCheckHook,
python,
}:
@@ -27,12 +28,14 @@ buildPythonPackage (finalAttrs: {
dependencies = [ aenum ];
checkPhase = ''
runHook preCheck
${python.interpreter} -m dbf.test
runHook postCheck
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
sed -i '/^import tempfile$/a tempdir = tempfile.mkdtemp()' dbf/test.py
'';
enabledTestPaths = [ "dbf/test.py" ];
pythonImportsCheck = [ "dbf" ];
meta = {