Merge pull request #325047 from mweinelt/graphene-on-3.12

python312Packages.graphene: disable tests
This commit is contained in:
Martin Weinelt 2024-07-06 16:31:42 +02:00 committed by GitHub
commit c61836dc5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 9 deletions

View File

@ -1,7 +1,7 @@
{ lib
, buildNpmPackage
, gettext
, python311
, python3
, fetchFromGitHub
, fetchpatch2
, plugins ? [ ]
@ -9,7 +9,7 @@
}:
let
python = python311.override {
python = python3.override {
packageOverrides = final: prev: {
django-bootstrap4 = prev.django-bootstrap4.overridePythonAttrs (oldAttrs: rec {
version = "3.0.0";

View File

@ -3,11 +3,19 @@
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
django,
django-debug-toolbar,
graphene-django,
# tests
python,
pytest-django,
pytestCheckHook
}:
buildPythonPackage rec {
@ -33,17 +41,19 @@ buildPythonPackage rec {
pythonImportsCheck = [ "graphiql_debug_toolbar" ];
DB_BACKEND = "sqlite";
DB_NAME = ":memory:";
DJANGO_SETTINGS_MODULE = "tests.settings";
nativeCheckInputs = [
pytest-django
pytestCheckHook
];
checkPhase = ''
runHook preCheck
${python.interpreter} -m django test tests
runHook postCheck
preCheck = ''
export DB_BACKEND=sqlite
export DB_NAME=:memory:
export DJANGO_SETTINGS_MODULE=tests.settings
'';
meta = with lib; {
changelog = "https://github.com/flavors/django-graphiql-debug-toolbar/releases/tag/${src.rev}";
description = "Django Debug Toolbar for GraphiQL IDE";
homepage = "https://github.com/flavors/django-graphiql-debug-toolbar";
license = licenses.mit;

View File

@ -37,6 +37,9 @@ buildPythonPackage rec {
graphql-relay
];
# snaphottest->fastdiff->wasmer dependency chain does not support 3.12.
doCheck = pythonOlder "3.12";
nativeCheckInputs = [
pytest7CheckHook
pytest-asyncio