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 <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-27 00:45:49 +00:00
1 parent fe61ff3877
commit 8495df0910
1 file changed
+4
+4
View File
@@ -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()