python3.pkgs.django-postgresql-netfields: run tests

This commit is contained in:
Yureka 2023-09-25 21:00:33 +02:00
parent 058d9b8ff5
commit e11d9b5902

View file

@ -1,13 +1,18 @@
{ lib
{ stdenv
, lib
, buildPythonPackage
, django
, netaddr
, six
, fetchFromGitHub
, pythonOlder
, djangorestframework
# required for tests
#, djangorestframework
#, psycopg2
, postgresql
, postgresqlTestHook
, psycopg2
, pytestCheckHook
, pytest-django
}:
buildPythonPackage rec {
@ -30,23 +35,19 @@ buildPythonPackage rec {
six
];
# tests need a postgres database
doCheck = false;
doCheck = !stdenv.isDarwin; # could not create shared memory segment: Operation not permitted
# keeping the dependencies below as comment for reference
# checkPhase = ''
# python manage.py test
# '';
nativeCheckInputs = [
djangorestframework
postgresql
postgresqlTestHook
psycopg2
pytestCheckHook
pytest-django
];
# buildInputs = [
# djangorestframework
# psycopg2
# ];
# Requires psycopg2
# pythonImportsCheck = [
# "netfields"
# ];
postgresqlTestUserOptions = "LOGIN SUPERUSER";
env.DJANGO_SETTINGS_MODULE = "testsettings";
meta = with lib; {
description = "Django PostgreSQL netfields implementation";