fix tests

This commit is contained in:
Kay0u 2020-01-02 23:50:21 +08:00
parent 6490184333
commit 1bf566401d
No known key found for this signature in database
GPG key ID: 7FF262C033518333

View file

@ -79,6 +79,10 @@ def patch_logging(moulinette):
} }
def patch_lock(moulinette):
moulinette.core.MoulinetteLock._lock = lambda *args: None
@pytest.fixture(scope="session", autouse=True) @pytest.fixture(scope="session", autouse=True)
def moulinette(tmp_path_factory): def moulinette(tmp_path_factory):
import moulinette import moulinette
@ -98,6 +102,7 @@ def moulinette(tmp_path_factory):
patch_init(moulinette) patch_init(moulinette)
patch_translate(moulinette) patch_translate(moulinette)
patch_lock(moulinette)
logging = patch_logging(moulinette) logging = patch_logging(moulinette)
moulinette.init(logging_config=logging, _from_source=False) moulinette.init(logging_config=logging, _from_source=False)