From 8967e3c9e020f81282850e78d7d7618a42cfdd7c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 22 Apr 2021 13:41:50 +0200 Subject: [PATCH] python3Packages.keyring: disable keychain tests on darwin It is highly unlikely that we can communicate with keychain in our build environment. The tests were only recently enabled and have blocked this package ever since. --- .../python-modules/keyring/default.nix | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/keyring/default.nix b/pkgs/development/python-modules/keyring/default.nix index 79283ff6e774..6ebc99f57327 100644 --- a/pkgs/development/python-modules/keyring/default.nix +++ b/pkgs/development/python-modules/keyring/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, pythonOlder, fetchpatch +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pythonOlder , setuptools-scm , importlib-metadata , dbus-python @@ -21,10 +25,6 @@ buildPythonPackage rec { setuptools-scm ]; - checkInputs = [ - pytestCheckHook - ]; - propagatedBuildInputs = [ # this should be optional, however, it has a different API importlib-metadata # see https://github.com/jaraco/keyring/issues/503#issuecomment-798973205 @@ -34,7 +34,25 @@ buildPythonPackage rec { secretstorage ]; - pythonImportsCheck = [ "keyring" "keyring.backend" ]; + pythonImportsCheck = [ + "keyring" + "keyring.backend" + ]; + + checkInputs = [ + pytestCheckHook + ]; + + # Keychain communications isn't possible in our build environment + # keyring.errors.KeyringError: Can't get password from keychain: (-25307, 'Unknown Error') + disabledTests = lib.optionals (stdenv.isDarwin) [ + "test_multiprocess_get" + "test_multiprocess_get_after_native_get" + ]; + + disabledTestsPaths = [ + "tests/backends/test_macOS.py" + ]; meta = with lib; { description = "Store and access your passwords safely";