Skip to content

Commit 0eab8b6

Browse files
authored
Skip autobpm tests if librosa isn't available (#5516)
Debian doesn't have `librosa`. Allow the tests to continue.
2 parents 37a2cec + 336b5b3 commit 0eab8b6

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)