refactor(analyzer): split analyze_cuepoint steps

This commit is contained in:
jo 2023-02-03 18:01:13 +01:00 committed by Kyle Robbertze
parent 45b5c5caf1
commit 3a9ca109c3
3 changed files with 26 additions and 6 deletions

View file

@ -1,6 +1,9 @@
import pytest
from libretime_analyzer.pipeline.analyze_cuepoint import analyze_cuepoint
from libretime_analyzer.pipeline.analyze_cuepoint import (
analyze_cuepoint,
analyze_duration,
)
from ..fixtures import FILES
@ -15,7 +18,8 @@ from ..fixtures import FILES
),
)
def test_analyze_cuepoint(filepath, length, cuein, cueout):
metadata = analyze_cuepoint(filepath, {})
metadata = analyze_duration(filepath, {})
metadata = analyze_cuepoint(filepath, metadata)
assert metadata["length_seconds"] == pytest.approx(length, abs=0.1)
assert float(metadata["cuein"]) == pytest.approx(float(cuein), abs=1)