Skip to content

Commit d70f52a

Browse files
rbagdocelotl
authored andcommitted
Added subTest to distinguish tests inside a loop
1 parent 4f0a365 commit d70f52a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,12 @@ def test_instrumentation_without_client(self):
545545

546546
spans = self.assert_span(num_spans=len(results))
547547
for idx, res in enumerate(results):
548-
self.assertEqual(res.text, "Hello!")
549-
self.assertEqual(
550-
spans[idx].attributes[SpanAttributes.HTTP_URL], self.URL
551-
)
548+
with self.subTest(idx=idx, res=res):
549+
self.assertEqual(res.text, "Hello!")
550+
self.assertEqual(
551+
spans[idx].attributes[SpanAttributes.HTTP_URL],
552+
self.URL,
553+
)
552554

553555
HTTPXClientInstrumentor().uninstrument()
554556

0 commit comments

Comments
 (0)