mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-10-27 07:52:03 +00:00
Fix Windows CI failure in test_profile_management.py
Replace unsafe module reloading with explicit monkeypatching of constants. This prevents potential OSError: [Errno 22] Invalid argument on Windows during TemporaryDirectory cleanup or test execution when modules are reloaded in a way that affects global state or file handles. Also ensured `pm.fingerprint_manager` is initialized using the monkeypatched `APP_DIR` to guarantee it operates within the temporary directory context. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
ffe80e5b4d
commit
e748b6bf27
1 file changed
+1
@@ -36,6 +36,7 @@ def test_add_and_delete_entry(monkeypatch):
|
||||
|
||||
pm = manager_module.PasswordManager.__new__(manager_module.PasswordManager)
|
||||
pm.encryption_mode = EncryptionMode.SEED_ONLY
|
||||
# Initialize fingerprint_manager with the monkeypatched APP_DIR
|
||||
pm.fingerprint_manager = FingerprintManager(constants.APP_DIR)
|
||||
pm.current_fingerprint = None
|
||||
pm.save_and_encrypt_seed = lambda seed, fingerprint_dir: None
|
||||
|
||||
Reference in new issue
Block a user