mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-27 03:54:00 +03:00
23 lines
521 B
Python
23 lines
521 B
Python
|
"""Tests for wiring causes no issues with queue.Queue from std lib."""
|
||
|
|
||
|
from pytest import fixture
|
||
|
|
||
|
from samples.wiring import queuemodule
|
||
|
from samples.wiring.container import Container
|
||
|
|
||
|
|
||
|
@fixture
|
||
|
def container():
|
||
|
container = Container()
|
||
|
yield container
|
||
|
container.unwire()
|
||
|
|
||
|
|
||
|
def test_wire_queue(container: Container):
|
||
|
# See: https://github.com/ets-labs/python-dependency-injector/issues/362
|
||
|
# Should not raise exception
|
||
|
try:
|
||
|
container.wire(modules=[queuemodule])
|
||
|
except:
|
||
|
raise
|