tests: Avoid import errors during conftest setup
This commit is contained in:
parent
2b06b77865
commit
3810089be3
@ -2,8 +2,6 @@ from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
|
||||
from mopidy.file import library
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def file_config():
|
||||
@ -15,4 +13,8 @@ def file_config():
|
||||
|
||||
@pytest.fixture
|
||||
def file_library(file_config):
|
||||
# Import library, thus scanner, thus gobject as late as possible to avoid
|
||||
# hard to track import errors during conftest setup.
|
||||
from mopidy.file import library
|
||||
|
||||
return library.FileLibraryProvider(backend=None, config=file_config)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user