Skip to content

Commit fb23f5b

Browse files
committed
Fix tests
1 parent fcf7e7e commit fb23f5b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ pex = "*"
5252
requires = ["poetry-core"]
5353
build-backend = "poetry.core.masonry.api"
5454

55-
[tool.pytest.ini_options]
56-
asyncio_mode = "auto"
57-
asyncio_default_fixture_loop_scope = "function"
58-
5955
[tool.poetry.requires-plugins]
6056
poetry-plugin-export = ">=1.8"
57+
58+
[tool.pytest.ini_options]
59+
asyncio_mode = "auto"
60+
asyncio_default_fixture_loop_scope = "session"
61+
asyncio_default_test_loop_scope = "session"

tests/core/amqp/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020

2121
@pytest_asyncio.fixture(scope="function")
2222
async def amqp_pool(amqp_uri: str) -> AsyncGenerator[AmqpPool, None]:
23+
channel_pool.cache_clear()
2324
pool = channel_pool(amqp_uri)
2425
yield pool

tests/core/amqp/test_endpoint.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def params_2(amqp_pool, correlation_ids):
136136
return params("app-2", amqp_pool, correlation_ids)
137137

138138

139+
@pytest.mark.asyncio
139140
async def test_queue(params_1: EndpointParams, operation: Operation):
140141
producer: Sender[Log] = Sender(operation, params_1)
141142
consumer: Receiver[Log] = Receiver(operation, params_1)

0 commit comments

Comments
 (0)