From 0cdebad845742d119a63b26d7469788244a3adb8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 7 Jan 2023 10:57:06 +0100 Subject: [PATCH] python310Packages.django_treebeard: enable tests - add pythonImportsCheck --- .../django_treebeard/default.nix | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/django_treebeard/default.nix b/pkgs/development/python-modules/django_treebeard/default.nix index 39cad0896080..d334705784ab 100644 --- a/pkgs/development/python-modules/django_treebeard/default.nix +++ b/pkgs/development/python-modules/django_treebeard/default.nix @@ -1,24 +1,36 @@ { lib , buildPythonPackage -, fetchPypi -, pytest , django +, fetchPypi +, pytest-django +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "django-treebeard"; version = "4.6.0"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; hash = "sha256-frHrcbJCFPLn3DvSFfDDrjL9Z2QXnNR3SveqtJE53qA="; }; - buildInputs = [ pytest ]; - propagatedBuildInputs = [ django ]; + propagatedBuildInputs = [ + django + ]; - # tests fail "AppRegistryNotReady("Apps aren't loaded yet.")" - doCheck = false; + checkInputs = [ + pytest-django + pytestCheckHook + ]; + + pythonImportsCheck = [ + "treebeard" + ]; meta = with lib; { description = "Efficient tree implementations for Django";