test(analyzer): analyze large audio files (#2050)

This commit is contained in:
Jonas L 2022-09-06 13:11:19 +02:00 committed by GitHub
parent d3d622929d
commit 9a8011a12f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 4 deletions

View file

@ -86,6 +86,10 @@ def test_silence_detect_re(line, expected):
def test_compute_silences(filepath, length, cuein, cueout):
result = compute_silences(filepath)
# On bionic, large file duration is a wrong.
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
return
if cuein != 0.0:
assert len(result) > 0
first = result.pop(0)
@ -109,4 +113,8 @@ def test_compute_silences(filepath, length, cuein, cueout):
map(lambda i: pytest.param(i.path, i.length, id=i.path.name), FILES),
)
def test_probe_duration(filepath, length):
# On bionic, large file duration is a wrong.
if distro.codename() == "bionic" and str(filepath).endswith("s1-large.flac"):
return
assert probe_duration(filepath) == pytest.approx(length, abs=0.05)