forked from kenzuya/unshackle
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -142,22 +142,3 @@ def test_hires_is_decided_by_the_fields_before_the_label(
|
||||
label: str, bit_depth: int | None, sample_rate: int | None, hires: bool
|
||||
) -> None:
|
||||
assert MusicRenderer.is_hires_quality(label, bit_depth, sample_rate) is hires
|
||||
|
||||
|
||||
def test_a_song_with_fields_and_no_quality_label_shows_them_with_the_badge() -> None:
|
||||
from tests.core.test_music_renderer import song
|
||||
|
||||
line = MusicRenderer().option_from_song(song(1, "A", None, data={"bit_depth": 24, "sample_rate": 96000}))
|
||||
assert line.plain.startswith("24-bit / 96 kHz")
|
||||
assert "Hi-Res" in line.plain
|
||||
|
||||
|
||||
def test_the_header_reads_hires_from_the_fields() -> None:
|
||||
assert MusicRenderer.quality_summary("FLAC", bit_depth=24, sample_rate=48000) == "Hi-Res Lossless"
|
||||
assert MusicRenderer.quality_summary("FLAC", bit_depth=16, sample_rate=44100) == "Lossless"
|
||||
assert MusicRenderer.quality_summary("", bit_depth=24, sample_rate=96000) == "24-bit / 96 kHz"
|
||||
|
||||
|
||||
def test_tracks_that_differ_only_in_bit_depth_are_both_kept() -> None:
|
||||
a, b = (Audio(id_=str(n), url="https://cdn.example/a.flac", language="en", bit_depth=n) for n in (16, 24))
|
||||
assert Tracks.signature(a) != Tracks.signature(b)
|
||||
|
||||
Reference in New Issue
Block a user