mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-06 07:55:10 +00:00
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -12,9 +12,6 @@ import pytest
|
||||
from unshackle.core.api.progress import (
|
||||
DOWNLOAD_PROGRESS_CEILING,
|
||||
build_job_progress_callables,
|
||||
track_log_label,
|
||||
track_progress_label,
|
||||
track_progress_weight,
|
||||
)
|
||||
|
||||
pytestmark = pytest.mark.unit
|
||||
@@ -49,27 +46,6 @@ def noop(**kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def test_track_log_label_adds_the_track_id():
|
||||
video = Video(2160, "DV")
|
||||
video.id = "592464997"
|
||||
|
||||
assert track_log_label(video) == "video 2160p DV (592464997)"
|
||||
|
||||
|
||||
def test_track_progress_label():
|
||||
assert track_progress_label(Video(2160, "DV")) == "video 2160p DV"
|
||||
assert track_progress_label(Video(1080, "HDR10+")) == "video 1080p HDR10+"
|
||||
assert track_progress_label(Audio("en-US", "5.1")) == "audio en-US 5.1"
|
||||
assert track_progress_label(Subtitle("ro")) == "subtitle ro"
|
||||
|
||||
|
||||
def test_weight_video_over_audio_over_subtitle():
|
||||
assert track_progress_weight(Video(bitrate=4_000_000)) == 4_000_000
|
||||
assert track_progress_weight(Audio(bitrate=200_000)) == 200_000
|
||||
# subtitle has no bitrate -> small fixed weight, far below media
|
||||
assert track_progress_weight(Subtitle()) < track_progress_weight(Audio(bitrate=200_000))
|
||||
|
||||
|
||||
def test_weighting_makes_video_dominate_progress():
|
||||
updates: list[dict] = []
|
||||
video, sub = Video(bitrate=4_000_000), Subtitle()
|
||||
|
||||
Reference in New Issue
Block a user