diff --git a/tests/unit/samples/wiringstringids/resourceclosing.py b/tests/unit/samples/wiringstringids/resourceclosing.py index 6d9888ee..b692c488 100644 --- a/tests/unit/samples/wiringstringids/resourceclosing.py +++ b/tests/unit/samples/wiringstringids/resourceclosing.py @@ -64,7 +64,7 @@ class Container(containers.DeclarativeContainer): class ContainerSingleton(containers.DeclarativeContainer): - singleton = providers.Resource(Singleton) + singleton = providers.Singleton(Singleton) service = providers.Resource( init_service_with_singleton, singleton @@ -83,12 +83,16 @@ def test_function(service: Service = Closing[Provide["service"]]): @inject -def test_function_dependency(factory: FactoryService = Closing[Provide["factory_service"]]): +def test_function_dependency( + factory: FactoryService = Closing[Provide["factory_service"]] +): return factory @inject -def test_function_dependency_kwargs(factory: FactoryService = Closing[Provide["factory_service_kwargs"]]): +def test_function_dependency_kwargs( + factory: FactoryService = Closing[Provide["factory_service_kwargs"]] +): return factory diff --git a/tests/unit/wiring/string_ids/test_main_py36.py b/tests/unit/wiring/string_ids/test_main_py36.py index aed9364d..2861c3aa 100644 --- a/tests/unit/wiring/string_ids/test_main_py36.py +++ b/tests/unit/wiring/string_ids/test_main_py36.py @@ -33,7 +33,10 @@ def subcontainer(): container.unwire() -@fixture(params=[resourceclosing.Container, resourceclosing.ContainerSingleton]) +@fixture(params=[ + resourceclosing.Container, + resourceclosing.ContainerSingleton, +]) def resourceclosing_container(request): container = request.param() container.wire(modules=[resourceclosing])