feat: update profile path resolution and enhance scripts for improved project adaptability
This commit is contained in:
@@ -42,6 +42,12 @@ class ProfileTests(unittest.TestCase):
|
||||
self.assertEqual(profile.inbox_dir("missing", root=root), root / "ai" / "inbox")
|
||||
self.assertEqual(profile.index_dir("missing", root=root), root / ".aiw" / "indexes" / "missing")
|
||||
|
||||
def test_relative_to_root_handles_external_paths(self) -> None:
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
root = Path(tmp)
|
||||
self.assertEqual(profile.relative_to_root(root / "a" / "b", root=root), "a/b")
|
||||
self.assertEqual(profile.relative_to_root(Path("/external/path"), root=root), "/external/path")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user