bytestringify a few more paths in tests

This commit is contained in:
Johnny Robeson 2016-06-30 00:07:52 -04:00
parent a2a4926598
commit ecfda77f5a
3 changed files with 4 additions and 3 deletions

View file

@ -437,7 +437,8 @@ class TestHelper(object):
"""Create a temporary directory and assign it into
`self.temp_dir`. Call `remove_temp_dir` later to delete it.
"""
self.temp_dir = mkdtemp()
temp_dir = mkdtemp()
self.temp_dir = util.bytestring_path(temp_dir)
def remove_temp_dir(self):
"""Delete the temporary directory created by `create_temp_dir`.

View file

@ -416,7 +416,7 @@ class ArtImporterTest(UseThePlugin):
# Test library.
self.libpath = os.path.join(self.temp_dir, 'tmplib.blb')
self.libdir = os.path.join(self.temp_dir, 'tmplib')
self.libdir = os.path.join(self.temp_dir, b'tmplib')
os.mkdir(self.libdir)
os.mkdir(os.path.join(self.libdir, b'album'))
itempath = os.path.join(self.libdir, b'album', b'test.mp3')

View file

@ -449,7 +449,7 @@ class ReadWriteTestBase(ArtTestMixin, GenreListTestMixin,
]
def setUp(self):
self.temp_dir = tempfile.mkdtemp()
self.temp_dir = bytestring_path(tempfile.mkdtemp())
def tearDown(self):
if os.path.isdir(self.temp_dir):