mirror of
https://github.com/beetbox/beets.git
synced 2025-12-31 04:52:49 +01:00
parent
a7eace81d4
commit
36c2241a34
2 changed files with 5 additions and 6 deletions
|
|
@ -169,11 +169,11 @@ class TestCase(unittest.TestCase):
|
|||
|
||||
def assertExists(self, path):
|
||||
self.assertTrue(os.path.exists(path),
|
||||
'file does not exist: %s' % path)
|
||||
'file does not exist: {!r}'.format(path))
|
||||
|
||||
def assertNotExists(self, path):
|
||||
self.assertFalse(os.path.exists(path),
|
||||
'file exists: %s' % path)
|
||||
'file exists: {!r}'.format((path)))
|
||||
|
||||
|
||||
class LibTestCase(TestCase):
|
||||
|
|
|
|||
|
|
@ -133,16 +133,15 @@ class EmbedartCliTest(_common.TestCase, TestHelper):
|
|||
self.abbey_similarpath))
|
||||
|
||||
def test_non_ascii_album_path(self):
|
||||
resource_path = os.path.join(_common.RSRC, 'image.mp3')
|
||||
resource_path = os.path.join(_common.RSRC, 'image.mp3').encode('utf8')
|
||||
album = self.add_album_fixture()
|
||||
trackpath = album.items()[0].path
|
||||
albumpath = album.path
|
||||
shutil.copy(resource_path, trackpath.decode('utf-8'))
|
||||
shutil.copy(syspath(resource_path), syspath(trackpath))
|
||||
|
||||
self.run_command('extractart', '-n', 'extracted')
|
||||
|
||||
self.assertExists(os.path.join(albumpath.decode('utf-8'),
|
||||
'extracted.png'))
|
||||
self.assertExists(syspath(os.path.join(albumpath, b'extracted.png')))
|
||||
|
||||
|
||||
@patch('beets.art.subprocess')
|
||||
|
|
|
|||
Loading…
Reference in a new issue