mirror of
https://github.com/beetbox/beets.git
synced 2026-01-03 22:42:44 +01:00
bytestringify a few more paths in tests
This commit is contained in:
parent
a2a4926598
commit
ecfda77f5a
3 changed files with 4 additions and 3 deletions
|
|
@ -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`.
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue