parent
26bcb6a90d
commit
448cff7600
21 changed files with 54 additions and 196 deletions
|
@ -1,4 +1,3 @@
|
|||
import distro
|
||||
import pytest
|
||||
|
||||
from libretime_analyzer.pipeline.analyze_replaygain import analyze_replaygain
|
||||
|
@ -13,10 +12,5 @@ from ..fixtures import FILES
|
|||
def test_analyze_replaygain(filepath, replaygain):
|
||||
tolerance = 0.8
|
||||
|
||||
# On bionic, replaygain is a bit higher for loud mp3 files.
|
||||
# This huge tolerance makes the test pass, with values devianting from ~-17 to ~-13
|
||||
if distro.codename() == "bionic" and str(filepath).endswith("+12.mp3"):
|
||||
tolerance = 5
|
||||
|
||||
metadata = analyze_replaygain(filepath, {})
|
||||
assert metadata["replay_gain"] == pytest.approx(replaygain, abs=tolerance)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue