Skip to content

Commit 336b5b3

Browse files
committed
Skip autobpm tests if librosa isn't available
Except under GitHub CI, where we expect all tests to run.
1 parent 37a2cec commit 336b5b3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/plugins/test_autobpm.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
import importlib.util
2+
import os
3+
14
import pytest
25

36
from beets.test.helper import ImportHelper, PluginMixin
47

8+
github_ci = os.environ.get("GITHUB_ACTIONS") == "true"
9+
if not github_ci and not importlib.util.find_spec("librosa"):
10+
pytest.skip("librosa isn't available", allow_module_level=True)
11+
512

613
class TestAutoBPMPlugin(PluginMixin, ImportHelper):
714
plugin = "autobpm"

0 commit comments

Comments
 (0)