From d3264adddc6bbf0608c60d6b19ff7ac2d9175e09 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 09:23:25 +0000 Subject: [PATCH] Fix Windows CI failure in test_profile_management.py Patched `masked_input` in `utils.password_prompt` to bypass `msvcrt.getwch()` usage during tests, preventing `OSError: [Errno 22] Invalid argument` in non-interactive CI environments. Ensured the test logic relies on the mocked `builtins.input` as intended. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- src/tests/test_profile_management.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/test_profile_management.py b/src/tests/test_profile_management.py index ac98a1c8..35cf6aef 100644 --- a/src/tests/test_profile_management.py +++ b/src/tests/test_profile_management.py @@ -10,6 +10,7 @@ sys.path.append(str(Path(__file__).resolve().parents[1])) from utils.fingerprint_manager import FingerprintManager +import utils.password_prompt import constants import seedpass.core.manager as manager_module from seedpass.core.vault import Vault @@ -56,6 +57,8 @@ def test_add_and_delete_entry(monkeypatch): manager_module.PasswordManager, "generate_bip85_seed", lambda self: seed ) monkeypatch.setattr(manager_module, "confirm_action", lambda *_a, **_k: True) + # Ensure masked_input uses builtins.input (mocked below) instead of msvcrt on Windows + monkeypatch.setattr(utils.password_prompt, "masked_input", lambda p: input(p)) monkeypatch.setattr("builtins.input", lambda *_a, **_k: "3") pm.add_new_fingerprint()