Skip autobpm tests if librosa isn't available (#5516)

Debian doesn't have `librosa`. Allow the tests to continue.
This commit is contained in:
Šarūnas Nejus 2024-11-30 15:35:00 +00:00 committed by GitHub
commit 0eab8b68dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,14 @@
import importlib.util
import os
import pytest
from beets.test.helper import ImportHelper, PluginMixin
github_ci = os.environ.get("GITHUB_ACTIONS") == "true"
if not github_ci and not importlib.util.find_spec("librosa"):
pytest.skip("librosa isn't available", allow_module_level=True)
class TestAutoBPMPlugin(PluginMixin, ImportHelper):
plugin = "autobpm"