mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 22:42:44 +01:00
Prevent fails of tests when path contains dots
Unit test may fails when path to temprorary library contains `.`; to garantue that bug wasn't here, it forces to use one more `.` inside path. Fixes: https://github.com/beetbox/beets/issues/4151
This commit is contained in:
parent
57797a5d73
commit
c459ff26fb
1 changed files with 5 additions and 2 deletions
|
|
@ -148,7 +148,10 @@ class GetSetTest(_common.TestCase):
|
|||
class DestinationTest(_common.TestCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.lib = beets.library.Library(':memory:')
|
||||
# default directory is ~/Music and the only reason why it was switched
|
||||
# to ~/.Music is to confirm that tests works well when path to
|
||||
# temporary directory contains .
|
||||
self.lib = beets.library.Library(':memory:', '~/.Music')
|
||||
self.i = item(self.lib)
|
||||
|
||||
def tearDown(self):
|
||||
|
|
@ -224,7 +227,7 @@ class DestinationTest(_common.TestCase):
|
|||
self.i.album = '.something'
|
||||
dest = self.i.destination()
|
||||
self.assertTrue(b'something' in dest)
|
||||
self.assertFalse(b'/.' in dest)
|
||||
self.assertFalse(b'/.something' in dest)
|
||||
|
||||
def test_destination_preserves_legitimate_slashes(self):
|
||||
self.i.artist = 'one'
|
||||
|
|
|
|||
Loading…
Reference in a new issue