From 2c7e7d77279bb735e867ab5bfaafd1b392c73b5a Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Wed, 8 Jun 2016 12:59:45 -0700 Subject: [PATCH] Portable paths in mpdstats tests --- test/test_mpdstats.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_mpdstats.py b/test/test_mpdstats.py index 36f5d0d80..febf292d8 100644 --- a/test/test_mpdstats.py +++ b/test/test_mpdstats.py @@ -21,6 +21,7 @@ from test.helper import TestHelper from beets.library import Item from beetsplug.mpdstats import MPDStats +from beets import util class MPDStatsTest(unittest.TestCase, TestHelper): @@ -43,7 +44,7 @@ class MPDStatsTest(unittest.TestCase, TestHelper): self.assertFalse(mpdstats.update_rating(None, True)) def test_get_item(self): - item_path = '/foo/bar.flac' + item_path = util.normpath('/foo/bar.flac') item = Item(title=u'title', path=item_path, id=1) item.add(self.lib) @@ -60,7 +61,7 @@ class MPDStatsTest(unittest.TestCase, TestHelper): {'state': u'play', 'songid': 1, 'time': u'0:1'}, {'state': u'stop'}] EVENTS = [["player"]] * (len(STATUSES) - 1) + [KeyboardInterrupt] - item_path = '/foo/bar.flac' + item_path = util.normpath('/foo/bar.flac') @patch("beetsplug.mpdstats.MPDClientWrapper", return_value=Mock(**{ "events.side_effect": EVENTS, "status.side_effect": STATUSES,