mirror of
https://github.com/beetbox/beets.git
synced 2026-01-18 22:22:18 +01:00
Use syspath for existence checks
This commit is contained in:
parent
2fefd2471a
commit
e508daea63
2 changed files with 3 additions and 3 deletions
|
|
@ -127,11 +127,11 @@ class Assertions(object):
|
|||
"""A mixin with additional unit test assertions."""
|
||||
|
||||
def assertExists(self, path): # noqa
|
||||
self.assertTrue(os.path.exists(path),
|
||||
self.assertTrue(os.path.exists(util.syspath(path)),
|
||||
u'file does not exist: {!r}'.format(path))
|
||||
|
||||
def assertNotExists(self, path): # noqa
|
||||
self.assertFalse(os.path.exists(path),
|
||||
self.assertFalse(os.path.exists(util.syspath(path)),
|
||||
u'file exists: {!r}'.format((path)))
|
||||
|
||||
def assert_equal_path(self, a, b):
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class EmbedartCliTest(_common.TestCase, TestHelper):
|
|||
|
||||
self.run_command('extractart', '-n', 'extracted')
|
||||
|
||||
self.assertExists(syspath(os.path.join(albumpath, b'extracted.png')))
|
||||
self.assertExists(os.path.join(albumpath, b'extracted.png'))
|
||||
|
||||
|
||||
@patch('beets.art.subprocess')
|
||||
|
|
|
|||
Loading…
Reference in a new issue