fix: normalize resolved path before comparison in Hermes adapter test
test_installed_plugin_resolves_repo_assets_for_completion_check compared the skill_root the production code returns (canonicalized via Path.resolve(), which normalizes Windows 8.3 short-name aliases such as OASRVA~1 to the real account name) against an unresolved path built from tempfile's raw TEMP value. On accounts where TEMP itself is short-name-aliased, the two sides disagree even though they point at the same directory. Resolving the expected side the same way fixes the false failure without changing what the test verifies.
This commit is contained in:
@@ -391,7 +391,11 @@ class HermesAdapterTests(unittest.TestCase):
|
||||
result = json.loads(installed_tools.planning_with_files_check_complete(cwd=str(project_dir)))
|
||||
self.assertTrue(result["ok"])
|
||||
self.assertTrue(result["complete"])
|
||||
self.assertEqual(str(skill_copy), result["skill_root"])
|
||||
# resolve_skill_dir() canonicalizes via Path.resolve(), which on Windows
|
||||
# normalizes 8.3 short-name aliases (e.g. OASRVA~1 -> oasrvadmin). Compare
|
||||
# against the same canonical form so the assertion holds regardless of
|
||||
# whether TEMP happens to be short-name-aliased on the host account.
|
||||
self.assertEqual(str(skill_copy.resolve()), result["skill_root"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user