python3Packages.protobuf4: disable tests that fail on 32bit (#354992)

This commit is contained in:
Theodore Ni 2024-11-10 21:27:29 -08:00 committed by GitHub
commit 2049461e54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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") [