Use syspath for existence checks

This commit is contained in:
Adrian Sampson 2016-06-09 09:43:24 -07:00
parent 2fefd2471a
commit e508daea63
2 changed files with 3 additions and 3 deletions

View file

@ -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):

View file

@ -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')