Fix symlink tests for macOS (#6374)

👋🏻 I was trying to set up a local dev environment and noticed a couple
of tests were failing. On macOS, temporary files are created under
`/var`, which is itself a symlink to `/private/var`. This PR resolves
the `assert`s against temp file paths in tests.
This commit is contained in:
Šarūnas Nejus 2026-03-02 09:33:16 +00:00 committed by GitHub
commit 43a2c69aa6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -165,7 +165,7 @@ class MoveTest(BeetsTestCase):
self.i.move(operation=MoveOperation.LINK)
assert self.dest.exists()
assert os.path.islink(syspath(self.dest))
assert self.dest.resolve() == self.path
assert self.dest.resolve() == self.path.resolve()
@unittest.skipUnless(_common.HAVE_SYMLINK, "need symlinks")
def test_link_does_not_depart(self):

View file

@ -131,7 +131,7 @@ class NonAutotaggedImportTest(PathsMixin, AsIsImporterMixin, ImportTestCase):
assert self.track_lib_path.exists()
assert self.track_lib_path.is_symlink()
assert self.track_lib_path.resolve() == self.track_import_path
assert self.track_lib_path.resolve() == self.track_import_path.resolve()
@unittest.skipUnless(_common.HAVE_HARDLINK, "need hardlinks")
def test_import_hardlink_arrives(self):