mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
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.
This commit is contained in:
@@ -54,7 +54,11 @@ class Home(unittest.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.tmp = tempfile.TemporaryDirectory()
|
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.addCleanup(self.tmp.cleanup)
|
||||||
self.applications = self.home / ".local/share/applications"
|
self.applications = self.home / ".local/share/applications"
|
||||||
self.autostart = self.home / ".config/autostart"
|
self.autostart = self.home / ".config/autostart"
|
||||||
|
|||||||
Reference in New Issue
Block a user