mirror of
https://github.com/beetbox/beets.git
synced 2026-03-06 21:22:09 +01:00
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:
commit
43a2c69aa6
2 changed files with 2 additions and 2 deletions
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue