Use parametrized fixture for containers

This commit is contained in:
jazzthief 2023-05-23 18:26:07 +02:00
parent 2dabfaaad3
commit 2ca44a0b34
No known key found for this signature in database
GPG Key ID: 650DC0A0E6B6947C

View File

@ -33,9 +33,9 @@ def subcontainer():
container.unwire()
@fixture
def resourceclosing_container():
container = resourceclosing.Container()
@fixture(params=[resourceclosing.Container, resourceclosing.ContainerSingleton])
def resourceclosing_container(request):
container = request.param()
container.wire(modules=[resourceclosing])
yield container
container.unwire()