mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-30 19:24:31 +03:00
Use parametrized fixture for containers
This commit is contained in:
parent
2dabfaaad3
commit
2ca44a0b34
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user