From 822590d062486876765c1c988eae739d5d19148e Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Sun, 10 Nov 2024 12:00:00 +0000 Subject: [PATCH] python3Packages.protobuf4: disable tests that fail on 32bit --- .../development/python-modules/protobuf/4.nix | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/protobuf/4.nix b/pkgs/development/python-modules/protobuf/4.nix index d58e21d195a1..2d1a3f9d861f 100644 --- a/pkgs/development/python-modules/protobuf/4.nix +++ b/pkgs/development/python-modules/protobuf/4.nix @@ -4,6 +4,7 @@ fetchpatch, isPyPy, lib, + stdenv, numpy, protobuf, pytestCheckHook, @@ -84,15 +85,21 @@ buildPythonPackage { pytestCheckHook ] ++ lib.optionals (lib.versionAtLeast protobuf.version "22") [ numpy ]; - disabledTests = lib.optionals isPyPy [ - # error message differs - "testInvalidTimestamp" - # requires tracemalloc which pypy does not implement - # https://foss.heptapod.net/pypy/pypy/-/issues/3048 - "testUnknownFieldsNoMemoryLeak" - # assertion is not raised for some reason - "testStrictUtf8Check" - ]; + disabledTests = + lib.optionals isPyPy [ + # error message differs + "testInvalidTimestamp" + # requires tracemalloc which pypy does not implement + # https://foss.heptapod.net/pypy/pypy/-/issues/3048 + "testUnknownFieldsNoMemoryLeak" + # assertion is not raised for some reason + "testStrictUtf8Check" + ] + ++ lib.optionals stdenv.hostPlatform.is32bit [ + # OverflowError: timestamp out of range for platform time_t + "testTimezoneAwareDatetimeConversionWhereTimestampLosesPrecision" + "testTimezoneNaiveDatetimeConversionWhereTimestampLosesPrecision" + ]; disabledTestPaths = lib.optionals (lib.versionAtLeast protobuf.version "23") [