refactor(analyzer): improve analyzer pipeline module (#1542)
* rename steps to pipeline module * move pipeline entrypoint to pipeline module * rename steps test module to pipeline * fix paths after renames * move step protocol to pipeline * create pipeline status enum * use Protocol from typing extensions * Fix linting
This commit is contained in:
parent
74c8d20284
commit
cba905e367
18 changed files with 34 additions and 26 deletions
22
analyzer/tests/pipeline/analyze_cuepoint_test.py
Normal file
22
analyzer/tests/pipeline/analyze_cuepoint_test.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
import pytest
|
||||
|
||||
from libretime_analyzer.pipeline.analyze_cuepoint import analyze_cuepoint
|
||||
|
||||
from ..fixtures import FILES
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"filepath,length,cuein,cueout",
|
||||
map(
|
||||
lambda i: pytest.param(
|
||||
str(i.path), i.length, i.cuein, i.cueout, id=i.path.name
|
||||
),
|
||||
FILES,
|
||||
),
|
||||
)
|
||||
def test_analyze_cuepoint(filepath, length, cuein, cueout):
|
||||
metadata = analyze_cuepoint(filepath, dict())
|
||||
|
||||
assert metadata["length_seconds"] == pytest.approx(length, abs=0.1)
|
||||
assert float(metadata["cuein"]) == pytest.approx(float(cuein), abs=1)
|
||||
assert float(metadata["cueout"]) == pytest.approx(float(cueout), abs=1)
|
Loading…
Add table
Add a link
Reference in a new issue