From d2d8e4c0906ad95f4ce62279032bdcea93c6c97f Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sat, 30 Oct 2010 00:45:08 +0200 Subject: [PATCH] Use expanduser for find_files --- mopidy/utils/path.py | 1 + tests/utils/path_test.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/mopidy/utils/path.py b/mopidy/utils/path.py index ef331045..84869196 100644 --- a/mopidy/utils/path.py +++ b/mopidy/utils/path.py @@ -46,6 +46,7 @@ def split_path(path): return parts def find_files(path): + path = os.path.expanduser(path) if os.path.isfile(path): yield os.path.abspath(path) else: diff --git a/tests/utils/path_test.py b/tests/utils/path_test.py index 2990c6d3..269c7a24 100644 --- a/tests/utils/path_test.py +++ b/tests/utils/path_test.py @@ -132,3 +132,6 @@ class FindFilesTest(unittest.TestCase): files = self.find('blank.mp3') self.assertEqual(len(files), 1) self.assert_(files[0], data_folder('blank.mp3')) + + def test_expanduser(self): + raise SkipTest