From 01c91eb42586d78eec05f4ae07358c12e30d8662 Mon Sep 17 00:00:00 2001 From: yusufipk Date: Sun, 16 Aug 2026 15:09:40 +0300 Subject: [PATCH] Resolve the test's home before comparing paths to it A Mac keeps temporary directories under /var, which is a symlink to /private/var, and target() resolves what it is handed because a bundle reached through a symlink is still that bundle. So the login item named /private/var/... while the test held /var/..., and the two spellings of one path did not match. --- tests/test_integrate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_integrate.py b/tests/test_integrate.py index 1b574c9..a71744c 100644 --- a/tests/test_integrate.py +++ b/tests/test_integrate.py @@ -54,7 +54,11 @@ class Home(unittest.TestCase): def setUp(self): self.tmp = tempfile.TemporaryDirectory() - self.home = pathlib.Path(self.tmp.name) + # Resolved, because target() resolves what it is handed and a Mac's + # temporary directory is under /var, which is a symlink to /private/var. + # Left alone, every path here would be compared against the other + # spelling of itself. + self.home = pathlib.Path(self.tmp.name).resolve() self.addCleanup(self.tmp.cleanup) self.applications = self.home / ".local/share/applications" self.autostart = self.home / ".config/autostart"