File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
opentelemetry-instrumentation/tests/auto_instrumentation Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -309,12 +309,14 @@ def test_load_instrumentors_dep_conflict(
309309 ep_mock4 = Mock ()
310310 ep_mock4 .name = "instr4" # dependency conflict
311311
312+ dependency_conflict = DependencyConflict ("1.2.3" , None )
313+
312314 distro_mock = Mock ()
313315
314316 iter_mock .return_value = (ep_mock1 , ep_mock2 , ep_mock3 , ep_mock4 )
315317 print ((ep_mock1 , ep_mock2 , ep_mock3 , ep_mock4 ))
316318 # If a dependency conflict is raised, that instrumentation should not be loaded, but others still should.
317- dependency_conflict = DependencyConflict ( "1.2.3" , None )
319+ # In this case, ep_mock4 will not be loaded and ep_mock2 will succeed. (ep_mock1 and ep_mock3 are disabled )
318320 mock_dep .side_effect = [None , dependency_conflict ]
319321 _load ._load_instrumentors (distro_mock )
320322 distro_mock .load_instrumentor .assert_has_calls (
You can’t perform that action at this time.
0 commit comments