test(analyzer): rename and remove unused imports
This commit is contained in:
parent
7aba20f1ac
commit
6a919a9805
6 changed files with 30 additions and 36 deletions
|
@ -11,12 +11,12 @@ from ..fixtures import FILE_INVALID_DRM, FILES, Fixture
|
|||
"filepath,replaygain",
|
||||
map(lambda i: (str(i.path), i.replaygain), FILES),
|
||||
)
|
||||
def test_analyze(filepath, replaygain):
|
||||
def test_analyze_replaygain(filepath, replaygain):
|
||||
metadata = analyze_replaygain(filepath, dict())
|
||||
assert metadata["replay_gain"] == pytest.approx(replaygain, abs=0.6)
|
||||
|
||||
|
||||
def test_analyze_missing_replaygain():
|
||||
def test_analyze_replaygain_missing_replaygain():
|
||||
with patch(
|
||||
"libretime_analyzer.steps.analyze_replaygain.REPLAYGAIN_EXECUTABLE",
|
||||
"foobar",
|
||||
|
@ -24,11 +24,11 @@ def test_analyze_missing_replaygain():
|
|||
analyze_replaygain(str(FILES[0].path), dict())
|
||||
|
||||
|
||||
def test_analyze_invalid_filepath():
|
||||
def test_analyze_replaygain_invalid_filepath():
|
||||
with pytest.raises(KeyError):
|
||||
test_analyze("non-existent-file", None)
|
||||
test_analyze_replaygain("non-existent-file", None)
|
||||
|
||||
|
||||
def test_analyze_invalid_wma():
|
||||
with pytest.raises(KeyError):
|
||||
test_analyze(FILE_INVALID_DRM, None)
|
||||
test_analyze_replaygain(FILE_INVALID_DRM, None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue