Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 589ea7c

Browse files
committedNov 27, 2023
black formting
1 parent addc029 commit 589ea7c

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed
 

Diff for: ‎instrumentation/opentelemetry-instrumentation-aio-pika/tests/test_publish_decorator.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,17 @@ def test_robust_publish(self):
9696
def _test_publish_works_with_not_recording_span(self, exchange_type):
9797
exchange = exchange_type(CONNECTION_7, CHANNEL_7, EXCHANGE_NAME)
9898
with mock.patch.object(
99-
PublishDecorator, "_get_publish_span"
99+
PublishDecorator, "_get_publish_span"
100100
) as mock_get_publish_span:
101101
mocked_not_recording_span = MagicMock()
102102
mocked_not_recording_span.is_recording.return_value = False
103103
mock_get_publish_span.return_value = mocked_not_recording_span
104104
with mock.patch.object(
105-
Exchange, "publish", return_value=asyncio.sleep(0)
105+
Exchange, "publish", return_value=asyncio.sleep(0)
106106
) as mock_publish:
107107
with mock.patch(
108-
"opentelemetry.instrumentation.aio_pika.publish_decorator.propagate.inject") as mock_inject:
108+
"opentelemetry.instrumentation.aio_pika.publish_decorator.propagate.inject"
109+
) as mock_inject:
109110
decorated_publish = PublishDecorator(
110111
self.tracer, exchange
111112
).decorate(mock_publish)
@@ -178,16 +179,17 @@ def test_robust_publish(self):
178179
def _test_publish_works_with_not_recording_span(self, exchange_type):
179180
exchange = exchange_type(CONNECTION_7, CHANNEL_7, EXCHANGE_NAME)
180181
with mock.patch.object(
181-
PublishDecorator, "_get_publish_span"
182+
PublishDecorator, "_get_publish_span"
182183
) as mock_get_publish_span:
183184
mocked_not_recording_span = MagicMock()
184185
mocked_not_recording_span.is_recording.return_value = False
185186
mock_get_publish_span.return_value = mocked_not_recording_span
186187
with mock.patch.object(
187-
Exchange, "publish", return_value=asyncio.sleep(0)
188+
Exchange, "publish", return_value=asyncio.sleep(0)
188189
) as mock_publish:
189190
with mock.patch(
190-
"opentelemetry.instrumentation.aio_pika.publish_decorator.propagate.inject") as mock_inject:
191+
"opentelemetry.instrumentation.aio_pika.publish_decorator.propagate.inject"
192+
) as mock_inject:
191193
decorated_publish = PublishDecorator(
192194
self.tracer, exchange
193195
).decorate(mock_publish)

Diff for: ‎instrumentation/opentelemetry-instrumentation-pika/tests/test_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,4 +447,4 @@ def test_decorate_basic_publish_when_span_is_not_recording(
447447
callback.assert_called_once_with(
448448
exchange_name, routing_key, mock_body, properties, False
449449
)
450-
self.assertEqual(retval, callback.return_value)
450+
self.assertEqual(retval, callback.return_value)

0 commit comments

Comments
 (0)
Please sign in to comment.