python3Packages.valkey: fix test errors on Darwin

This commit is contained in:
Sarah Clark 2025-07-05 21:05:50 -07:00
parent c9cba7a1ea
commit 61511b707e

View File

@ -1,5 +1,6 @@
{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
pythonOlder,
@ -76,14 +77,27 @@ buildPythonPackage rec {
pytestFlagsArray = [ "-m 'not onlycluster and not ssl'" ];
disabledTests = [
# valkey.sentinel.MasterNotFoundError: No master found for 'valkey-py-test'
"test_get_from_cache"
"test_cache_decode_response"
# Expects another valkey instance on port 6380 *shrug*
"test_psync"
disabledTests =
[
# valkey.sentinel.MasterNotFoundError: No master found for 'valkey-py-test'
"test_get_from_cache"
"test_cache_decode_response"
# Expects another valkey instance on port 6380 *shrug*
"test_psync"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# OSError: AF_UNIX path too long
"test_uds_connect"
"test_network_connection_failure"
];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# AttributeError: Can't get local object 'TestMultiprocessing.test_valkey_client.<locals>.target'
"tests/test_multiprocessing.py"
];
__darwinAllowLocalNetworking = true;
meta = {
description = "Python client for Redis key-value store";
homepage = "https://github.com/valkey-io/valkey-py";