File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
opentelemetry-instrumentation/tests/auto_instrumentation Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 2323 OTEL_PYTHON_DISTRO ,
2424)
2525from opentelemetry .instrumentation .version import __version__
26+ from opentelemetry .util ._importlib_metadata import entry_points
2627
2728
2829class TestLoad (TestCase ):
@@ -314,3 +315,19 @@ def test_load_instrumentors_dep_conflict(
314315 ]
315316 )
316317 distro_mock .load_instrumentor .assert_called_once ()
318+
319+ def test_load_instrumentors_no_entry_point_mocks (self ):
320+ distro_mock = Mock ()
321+ _load ._load_instrumentors (distro_mock )
322+ # this has no specific assert because it is run for every instrumentation
323+ self .assertTrue (True )
324+
325+ def test_entry_point_dist_finder (self ):
326+ entry_point_finder = _load ._EntryPointDistFinder ()
327+ self .assertTrue (entry_point_finder ._mapping )
328+ entry_point = list (
329+ entry_points (group = "opentelemetry_environment_variables" )
330+ )[0 ]
331+ self .assertTrue (entry_point )
332+ entry_point_dist = entry_point_finder .dist_for (entry_point )
333+ self .assertEqual (entry_point .dist , entry_point_dist )
You can’t perform that action at this time.
0 commit comments