From 50cfe2b31da14f5424524ec71655a5b6d0d83f41 Mon Sep 17 00:00:00 2001 From: Lari-Matias Orjala Date: Tue, 9 Nov 2021 12:21:38 +0200 Subject: [PATCH] remove autouse from fixtures (#23) --- pytest_lockable/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest_lockable/plugin.py b/pytest_lockable/plugin.py index 03b3f45..c0baf58 100644 --- a/pytest_lockable/plugin.py +++ b/pytest_lockable/plugin.py @@ -18,7 +18,7 @@ def pytest_addoption(parser): group.addoption("--allocation_lock_folder", default=tempfile.gettempdir(), help="Allocation lockfiles folder") -@pytest.fixture(scope="session", autouse=True) +@pytest.fixture(scope="session") def lockable(pytestconfig): """ pytest fixture that yields function for allocate any resource @@ -36,7 +36,7 @@ def test_foo(lockable): yield _lockable -@pytest.fixture(scope="session", autouse=True) +@pytest.fixture(scope="session") def lockable_resource(pytestconfig, lockable): # pylint: disable=redefined-outer-name """ pytest fixture that lock suitable resource and yield it