From e508daea63aa013914ba694b533779764beb1c65 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 9 Jun 2016 09:43:24 -0700 Subject: [PATCH] Use syspath for existence checks --- test/_common.py | 4 ++-- test/test_embedart.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/_common.py b/test/_common.py index ab73481c3..ecdde1a6c 100644 --- a/test/_common.py +++ b/test/_common.py @@ -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): diff --git a/test/test_embedart.py b/test/test_embedart.py index 123bc4ff4..e58350352 100644 --- a/test/test_embedart.py +++ b/test/test_embedart.py @@ -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')