mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-03 03:12:07 +00:00
Revert one path assertion I changed on inference rather than evidence
The sweep in the previous commit assumed every one of these assertions compares against a path the app normalizes through Path. That is true for four of them — each was observed failing on Windows with a "\tmp\..." actual — and false for the fifth. CreateProfileScreen stores backup_path as the raw `.value.strip()` from its input, so the POSIX literal was already correct and my change broke a test that had been passing on Windows. Nothing local could catch it: the two forms are identical on POSIX, so the assertion reads the same either way here. That is the whole trap in this class of fix, and the only defence is to change an expectation because a failure showed you the actual value, not because a neighbouring line looked similar. Noted in the test so the next sweep does not redo it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Vtx94nXDmNgXEeThUZP4QN
This commit is contained in:
1 parent
967b33764a
commit
6fcd94b51a
1 file changed
+6
-1
@@ -924,7 +924,12 @@ async def test_tui3_create_profile_screen_supports_backup_restore_mode() -> None
|
||||
screen.query_one("#create-password", Input).value = "hunter2"
|
||||
await pilot.press("enter")
|
||||
await pilot.pause()
|
||||
assert restored["backup_path"] == str(Path("/tmp/profile-backup.enc"))
|
||||
# NOT str(Path(...)): CreateProfileScreen stores this field as the raw
|
||||
# `.value.strip()` from the input, without normalizing it, so the
|
||||
# literal is what the app actually passes through. The two forms are
|
||||
# identical on POSIX, which is exactly why changing this on inference
|
||||
# rather than on evidence broke Windows and nothing local caught it.
|
||||
assert restored["backup_path"] == "/tmp/profile-backup.enc"
|
||||
assert booted == {"fingerprint": "BACKUPFP1", "password": "hunter2"}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user