python313Packages.django-cachalot: actually use pytestCheckHook, skip broken tests

K900 9ef783d0 f4366b49

Changed files
+14 -10
pkgs
development
python-modules
django-cachalot
+14 -10
pkgs/development/python-modules/django-cachalot/default.nix
···
# redisTestHook does not work on darwin
doCheck = !stdenv.hostPlatform.isDarwin;
-
# disable broken pinning test
preCheck = ''
-
substituteInPlace cachalot/tests/read.py \
-
--replace-fail \
-
"def test_explain(" \
-
"def _test_explain("
'';
-
checkPhase = ''
-
runHook preCheck
-
${python.interpreter} runtests.py
-
runHook postCheck
-
'';
meta = with lib; {
description = "No effort, no worry, maximum performance";
···
# redisTestHook does not work on darwin
doCheck = !stdenv.hostPlatform.isDarwin;
preCheck = ''
+
export DJANGO_SETTINGS_MODULE=settings
'';
+
pytestFlags = [
+
"-o python_files=*.py"
+
"-o collect_imported_tests=false"
+
"cachalot/tests"
+
"cachalot/admin_tests"
+
];
+
+
disabledTests = [
+
# relies on specific EXPLAIN output format from sqlite, which is not stable
+
"test_explain"
+
# broken on django-debug-toolbar 6.0
+
"test_rendering"
+
];
meta = with lib; {
description = "No effort, no worry, maximum performance";