Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 7, 2024
1 parent 0839f26 commit ebd8f54
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions t/integration/test_py_amqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@
import uuid

import pytest

import kombu
from amqp.exceptions import NotFound

import kombu
from kombu.connection import ConnectionPool

from .common import (
BaseExchangeTypes,
BaseFailover,
BaseMessage,
BasePriority,
BaseTimeToLive,
BasicFunctionality,
)
from .common import (BaseExchangeTypes, BaseFailover, BaseMessage,
BasePriority, BaseTimeToLive, BasicFunctionality)


def get_connection(hostname, port, vhost):
Expand Down Expand Up @@ -115,7 +108,7 @@ def test_publish_confirm_does_not_block(self, confirm_publish_connection):
In case an exception occurs while the connection is in use, the pool should
close the exception. In case the connection is not closed before releasing it
back to the pool, the connection would remain in an unsuable state, causing
back to the pool, the connection would remain in an unusable state, causing
causing the next publish call to time out or block forever in case no
timeout is specified.
"""
Expand All @@ -125,7 +118,7 @@ def test_publish_confirm_does_not_block(self, confirm_publish_connection):
with pool.acquire(block=True) as connection:
producer = kombu.Producer(connection)
queue = kombu.Queue(
"test-queue-{}".format(uuid.uuid4()), channel=connection
f"test-queue-{uuid.uuid4()}", channel=connection
)
queue.declare()
producer.publish(
Expand All @@ -144,7 +137,7 @@ def test_publish_confirm_does_not_block(self, confirm_publish_connection):
assert not connection.connected
producer = kombu.Producer(connection)
queue = kombu.Queue(
"test-queue-{}".format(uuid.uuid4()), channel=connection
f"test-queue-{uuid.uuid4()}", channel=connection
)
queue.declare()
# In case the connection is broken, we should get a Timeout here
Expand Down

0 comments on commit ebd8f54

Please sign in to comment.