Skip autobpm tests if librosa isn't available

Except under GitHub CI, where we expect all tests to run.
This commit is contained in:
Stefano Rivera 2024-11-25 11:43:29 +01:00
parent 37a2ceccd1
commit 336b5b369e

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"