Skip to content

Commit

Permalink
Skip autobpm tests if librosa isn't available
Browse files Browse the repository at this point in the history
Except under GitHub CI, where we expect all tests to run.
  • Loading branch information
stefanor committed Nov 30, 2024
1 parent 37a2cec commit 336b5b3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/plugins/test_autobpm.py
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 336b5b3

Please sign in to comment.