From 3810089be39a4301cad31445ba4bdab84dbc3375 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 27 Jul 2015 13:41:29 +0200 Subject: [PATCH] tests: Avoid import errors during conftest setup --- tests/file/conftest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/file/conftest.py b/tests/file/conftest.py index c93a71f2..c4ba96f4 100644 --- a/tests/file/conftest.py +++ b/tests/file/conftest.py @@ -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)