Use shutil.move() instead of os.replace/rename
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import unittest
|
||||
|
||||
from tempfile import NamedTemporaryFile
|
||||
@@ -80,7 +81,7 @@ class CoverArtTestCase(unittest.TestCase):
|
||||
with NamedTemporaryFile(suffix='.cover.jpg', delete=False) as f:
|
||||
f.write(data)
|
||||
os.chmod(f.name, 0o644)
|
||||
os.replace(f.name, cover_art_path)
|
||||
shutil.move(f.name, cover_art_path)
|
||||
return cover_art_path
|
||||
|
||||
def testCoverArtPath(self):
|
||||
|
||||
Reference in New Issue
Block a user