Use expanduser for find_files

This commit is contained in:
Thomas Adamcik 2010-10-30 00:45:08 +02:00
parent 96d4633306
commit d2d8e4c090
2 changed files with 4 additions and 0 deletions

View File

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

View File

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