diff --git a/pkgs/development/python-modules/valkey/default.nix b/pkgs/development/python-modules/valkey/default.nix index 48801cf68b73..25cac9c152b2 100644 --- a/pkgs/development/python-modules/valkey/default.nix +++ b/pkgs/development/python-modules/valkey/default.nix @@ -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..target' + "tests/test_multiprocessing.py" ]; + __darwinAllowLocalNetworking = true; + meta = { description = "Python client for Redis key-value store"; homepage = "https://github.com/valkey-io/valkey-py";