Skip to content

Commit 5337d41

Browse files
committed
windows: do not skip test when hiding file fails
1 parent e127d2f commit 5337d41

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

test/plugins/test_fetchart.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ def check_cover_is_stored(self):
4242

4343
def hide_file_windows(self):
4444
hidden_mask = 2
45-
success = ctypes.windll.kernel32.SetFileAttributesW(
46-
self.cover_path, hidden_mask
45+
self.assertTrue(
46+
ctypes.windll.kernel32.SetFileAttributesW(
47+
self.cover_path, hidden_mask
48+
),
49+
"Could not set file attributes",
4750
)
48-
if not success:
49-
self.skipTest("unable to set file attributes")
5051

5152
def test_set_art_from_folder(self):
5253
self.touch(b"c\xc3\xb6ver.jpg", dir=self.album.path, content="IMAGE")

test/test_hidden.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,10 @@ def test_windows_hidden(self):
5757

5858
with tempfile.NamedTemporaryFile() as f:
5959
# Hide the file using
60-
success = ctypes.windll.kernel32.SetFileAttributesW(
61-
f.name, hidden_mask
60+
self.assertTrue(
61+
ctypes.windll.kernel32.SetFileAttributesW(f.name, hidden_mask),
62+
"Could not set file attributes",
6263
)
63-
64-
if not success:
65-
self.skipTest("unable to set file attributes")
66-
6764
self.assertTrue(hidden.is_hidden(f.name))
6865

6966
def test_other_hidden(self):

0 commit comments

Comments
 (0)