Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0576a0

Browse files
authored
Add checking instrumentation scope in test base (open-telemetry#3539)
1 parent 36aaa84 commit c0576a0

File tree

1 file changed

+6
-0
lines changed
  • tests/opentelemetry-test-utils/src/opentelemetry/test

1 file changed

+6
-0
lines changed

tests/opentelemetry-test-utils/src/opentelemetry/test/test_base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ def assertEqualSpanInstrumentationInfo(self, span, module):
7474
self.assertEqual(span.instrumentation_info.name, module.__name__)
7575
self.assertEqual(span.instrumentation_info.version, module.__version__)
7676

77+
def assertEqualSpanInstrumentationScope(self, span, module):
78+
self.assertEqual(span.instrumentation_scope.name, module.__name__)
79+
self.assertEqual(
80+
span.instrumentation_scope.version, module.__version__
81+
)
82+
7783
def assertSpanHasAttributes(self, span, attributes):
7884
for key, val in attributes.items():
7985
self.assertIn(key, span.attributes)

0 commit comments

Comments
 (0)