mirror of
https://github.com/beetbox/beets.git
synced 2026-04-01 19:23:55 +02:00
Fix module-level skip: use pytest.skip(allow_module_level=True) for discogs
This commit is contained in:
parent
04e5d0083d
commit
da32d64599
1 changed files with 7 additions and 1 deletions
|
|
@ -18,7 +18,13 @@ from unittest.mock import Mock, patch
|
|||
|
||||
import pytest
|
||||
|
||||
pytest.importorskip("discogs_client", reason="discogs optional dependency not installed")
|
||||
try:
|
||||
import discogs_client # noqa: F401
|
||||
except ImportError:
|
||||
pytest.skip(
|
||||
"discogs optional dependency not installed",
|
||||
allow_module_level=True,
|
||||
)
|
||||
|
||||
from beets import config
|
||||
from beets.library import Item
|
||||
|
|
|
|||
Loading…
Reference in a new issue