test(context): skip symlink test without Windows privilege - #908
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoSkip Windows symlink test when symlink privilege is unavailable
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
|
Please address the Qodo finding , define a named constant for 1314 (e.g. _ERROR_PRIVILEGE_NOT_HELD = 1314) instead of the bare number. Also sys is missing from the imports at the top of the file , add import sys alongside the existing import errno line otherwise the sys.platform check will raise a NameError on every platform. |
|
Addressed in 7192ad6: added the named _ERROR_PRIVILEGE_NOT_HELD constant and updated the comparison. I also confirmed that import sys is present alongside import errno in the current PR head (it was already included in the original commit). Local verification on Python 3.12: 45 passed, 1 skipped; Black and isort checks pass. |
|
Thank you. LGTM |
Summary
Skip the markdown symlink-safety test on Windows only when the OS reports that the current process lacks the privilege required to create a symbolic link.
Problem
test_markdown_export_rejects_symlink_without_touching_targetfails before exercisingAgentMemory.export()on Windows environments without Developer Mode orSeCreateSymbolicLinkPrivilege:That is an environment capability failure, not a failure of the export safety behavior under test.
Changes
winerror == 1314fromPath.symlink_toOSError, preserving genuine failuresTesting
Result:
73 passed, 1 skipped in 2.15s.Also ran
git diff --check.