From 9f086440849df609fce12bcb64614d6e766c9a2e Mon Sep 17 00:00:00 2001 From: Minijackson Date: Fri, 11 Jul 2025 14:02:13 +0200 Subject: [PATCH] python3Packages.drf-extra-fields: fix tests exclusion The pytz failure doesn't depend on the Python version. This fixes the netbox-document plugin on NixOS 25.05. --- .../drf-extra-fields/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/drf-extra-fields/default.nix b/pkgs/development/python-modules/drf-extra-fields/default.nix index 431ad99e0d19..9ffeddfab9bb 100644 --- a/pkgs/development/python-modules/drf-extra-fields/default.nix +++ b/pkgs/development/python-modules/drf-extra-fields/default.nix @@ -48,16 +48,18 @@ buildPythonPackage rec { pythonImportsCheck = [ "drf_extra_fields" ]; - disabledTests = lib.optionals (pythonAtLeast "3.13") [ - # https://github.com/Hipo/drf-extra-fields/issues/210 - "test_read_source_with_context" - - # pytz causes the following tests to fail - "test_create" - "test_create_with_base64_prefix" - "test_create_with_webp_image" - "test_remove_with_empty_string" - ]; + disabledTests = + [ + # pytz causes the following tests to fail + "test_create" + "test_create_with_base64_prefix" + "test_create_with_webp_image" + "test_remove_with_empty_string" + ] + ++ lib.optionals (pythonAtLeast "3.13") [ + # https://github.com/Hipo/drf-extra-fields/issues/210 + "test_read_source_with_context" + ]; meta = { description = "Extra Fields for Django Rest Framework";