From 46f3b5bd9713fac84b397c20a8f142a742016216 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 7 Apr 2017 13:13:12 +0200 Subject: [PATCH] Use yield_fixture for fixtures with teardown Otherwise it'll complain that it can't use yield. Contributes to issue CURA-3497. --- tests/Settings/TestGlobalStack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Settings/TestGlobalStack.py b/tests/Settings/TestGlobalStack.py index c501e6aee0..89816ed678 100644 --- a/tests/Settings/TestGlobalStack.py +++ b/tests/Settings/TestGlobalStack.py @@ -48,7 +48,7 @@ class MockContainer: propertyChanged = unittest.mock.MagicMock() ## Fake container registry that always provides all containers you ask of. -@pytest.fixture() +@pytest.yield_fixture() def container_registry(): registry = unittest.mock.MagicMock()