From 8495df0910087eccfc7a159b69678ef4cfcabd42 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 00:45:49 +0000 Subject: [PATCH] test(ci): mock masked_input in profile management test Fixes `OSError: [Errno 22] Invalid argument` in Windows CI runs by mocking `utils.password_prompt.masked_input` in `test_add_and_delete_entry`. This prevents `msvcrt.getwch()` from being called in non-interactive environments when `PasswordManager.add_new_fingerprint` requests a password/seed. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- src/tests/test_profile_management.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tests/test_profile_management.py b/src/tests/test_profile_management.py index 79a08d10..bee6a2df 100644 --- a/src/tests/test_profile_management.py +++ b/src/tests/test_profile_management.py @@ -65,6 +65,10 @@ def test_add_and_delete_entry(monkeypatch): # Using "y" breaks the loop in confirm_action if it gets called. input_values = iter(["3", "y", "y", "y", "y"]) monkeypatch.setattr("builtins.input", lambda *_a, **_k: next(input_values)) + # Patch masked_input to avoid OSError on Windows CI non-interactive envs + monkeypatch.setattr( + utils.password_prompt, "masked_input", lambda p: next(input_values) + ) pm.add_new_fingerprint()