mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 08:39:17 +01:00
windows: do not skip test when hiding file fails
This commit is contained in:
parent
370ae43634
commit
c9702a4c24
2 changed files with 8 additions and 10 deletions
|
|
@ -42,11 +42,12 @@ class FetchartCliTest(unittest.TestCase, TestHelper):
|
|||
|
||||
def hide_file_windows(self):
|
||||
hidden_mask = 2
|
||||
success = ctypes.windll.kernel32.SetFileAttributesW(
|
||||
self.cover_path, hidden_mask
|
||||
self.assertTrue(
|
||||
ctypes.windll.kernel32.SetFileAttributesW(
|
||||
self.cover_path, hidden_mask
|
||||
),
|
||||
"Could not set file attributes",
|
||||
)
|
||||
if not success:
|
||||
self.skipTest("unable to set file attributes")
|
||||
|
||||
def test_set_art_from_folder(self):
|
||||
self.touch(b"c\xc3\xb6ver.jpg", dir=self.album.path, content="IMAGE")
|
||||
|
|
|
|||
|
|
@ -57,13 +57,10 @@ class HiddenFileTest(unittest.TestCase):
|
|||
|
||||
with tempfile.NamedTemporaryFile() as f:
|
||||
# Hide the file using
|
||||
success = ctypes.windll.kernel32.SetFileAttributesW(
|
||||
f.name, hidden_mask
|
||||
self.assertTrue(
|
||||
ctypes.windll.kernel32.SetFileAttributesW(f.name, hidden_mask),
|
||||
"Could not set file attributes",
|
||||
)
|
||||
|
||||
if not success:
|
||||
self.skipTest("unable to set file attributes")
|
||||
|
||||
self.assertTrue(hidden.is_hidden(f.name))
|
||||
|
||||
def test_other_hidden(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue