diff --git a/conftest.py b/conftest.py index 2dce06d4..5fbe4532 100644 --- a/conftest.py +++ b/conftest.py @@ -1,21 +1,8 @@ -import ctypes +import platform -collect_ignore = ["hook-keyring.backend.py"] +not_macOS = platform.system() != 'Darwin' -def macos_api_ignore(): - """ - Starting with macOS 11, the security API becomes - non-viable except on universal2 binaries. - - Ref #525. - """ - - try: - ctypes.CDLL(ctypes.util.find_library('Security')).SecItemAdd - return False - except Exception: - return True - - -collect_ignore.extend(['keyring/backends/macOS/api.py'] * macos_api_ignore()) +collect_ignore = ["hook-keyring.backend.py"] + [ + 'keyring/backends/macOS/api.py' +] * not_macOS