mirror of
https://github.com/beetbox/beets.git
synced 2026-01-11 02:13:28 +01:00
Merge branch 'pkess:fix_test_windows'
This commit is contained in:
commit
4069e49f42
1 changed files with 3 additions and 2 deletions
|
|
@ -36,6 +36,7 @@ from beets import util
|
|||
from beets import plugins
|
||||
from beets import config
|
||||
from beets.mediafile import MediaFile
|
||||
from beets.util import syspath
|
||||
from test.helper import TestHelper
|
||||
|
||||
# Shortcut to path normalization.
|
||||
|
|
@ -1044,7 +1045,7 @@ class WriteTest(unittest.TestCase, TestHelper):
|
|||
|
||||
def test_no_write_permission(self):
|
||||
item = self.add_item_fixture()
|
||||
path = item.path
|
||||
path = syspath(item.path)
|
||||
os.chmod(path, stat.S_IRUSR)
|
||||
|
||||
try:
|
||||
|
|
@ -1057,7 +1058,7 @@ class WriteTest(unittest.TestCase, TestHelper):
|
|||
def test_write_with_custom_path(self):
|
||||
item = self.add_item_fixture()
|
||||
custom_path = os.path.join(self.temp_dir, 'custom.mp3')
|
||||
shutil.copy(item.path, custom_path)
|
||||
shutil.copy(syspath(item.path), syspath(custom_path))
|
||||
|
||||
item['artist'] = 'new artist'
|
||||
self.assertNotEqual(MediaFile(custom_path).artist, 'new artist')
|
||||
|
|
|
|||
Loading…
Reference in a new issue