diff --git a/tests/test_core.py b/tests/test_core.py index 8c1a926b..9d8ebdf9 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -2,7 +2,6 @@ from __future__ import annotations import os -import sys from datetime import datetime, timedelta, timezone from pathlib import Path from textwrap import dedent @@ -30,11 +29,6 @@ # Core test pytestmark = pytest.mark.core -unix_platform = pytest.mark.skipif( - not sys.platform.startswith('linux'), - reason='only on linux platform', -) - def ensure(path: str | os.PathLike[str], *, directory: bool = False) -> Path: """Create a file (or directory) at path.""" @@ -308,10 +302,11 @@ def test_scan_video_movie_name_path_does_not_exist(movies: dict[str, Movie]) -> assert scanned_video.year == video.year -@unix_platform def test_scan_archive_error( rar: dict[str, str], ) -> None: + if 'pwd-protected' not in rar: + return path = rar['pwd-protected'] with pytest.raises(ArchiveError): scan_archive(path) @@ -320,11 +315,12 @@ def test_scan_archive_error( scan_video_or_archive(path) -@unix_platform def test_scan_videos_error( rar: dict[str, str], caplog: pytest.LogCaptureFixture, ) -> None: + if 'pwd-protected' not in rar: + return folder = Path(rar['pwd-protected']).parent # Test return without error scan_videos(folder)