Un-skip and fix Windows tests (#409) - #1538
Open
SAKMZ wants to merge 1 commit into
Open
Conversation
Many tests marked xfail on Windows now pass, so remove the stale markers. Fix the ones that were genuinely failing: normalize hardcoded "/" path separators with pathlib in test_keys_in_user_path and test_logs_path, and guard the POSIX "chmod 600" assertion in test_keys_set to non-Windows, which has no POSIX file modes. Two fragments tests still xfail on Windows because of a real bug where drive-letter paths (C:\...) are parsed as fragment prefixes; their reason strings now document the actual cause. Refs simonw#409 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #409.
On Windows today, many tests marked
@pytest.mark.xfail(sys.platform == "win32")actually pass — the markers are stale (thetest_chatones appear to have been fixed by the addition ofpyreadline3). This removes the stale markers and fixes the handful that were genuinely failing:xfailmarkers intest_chat.py,test_chat_templates.py, andtest_keys.py./path separators intest_keys_in_user_pathandtest_logs_pathby normalizing the expected paths withpathlib(correct on every platform).chmod 600assertion intest_keys_setto non-Windows, since Windows has no POSIX file modes.import sysfromtest_llm_logs.py.Two
fragmentstests stillxfailon Windows — they surface a genuine bug where drive-letter paths (C:\...) are parsed as fragment prefixes (Error: Unknown fragment prefix: C). I've updated theirreasonstrings to document the real cause and am happy to send a follow-up PR for the underlying fix.Verification
Run on Windows 11 / Python 3.14 for the affected files:
blackandruffare both clean.🤖 Generated with Claude Code