File tree 2 files changed +6
-1
lines changed
src/opentelemetry/context
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ def _load_runtime_context() -> typing.Optional[_RuntimeContext]:
60
60
iter ( # type: ignore
61
61
entry_points ( # type: ignore
62
62
group = "opentelemetry_context" ,
63
- name = OTEL_PYTHON_CONTEXT ,
63
+ name = default_context ,
64
64
)
65
65
)
66
66
).load ()()
Original file line number Diff line number Diff line change @@ -88,3 +88,8 @@ def test_load_runtime_context_default(self):
88
88
def test_load_runtime_context (self ):
89
89
ctx = context ._load_runtime_context () # pylint: disable=W0212
90
90
self .assertIsInstance (ctx , ContextVarsRuntimeContext )
91
+
92
+ @patch .dict ("os.environ" , {OTEL_PYTHON_CONTEXT : "foo" })
93
+ def test_load_runtime_context_fallback (self ):
94
+ ctx = context ._load_runtime_context () # pylint: disable=W0212
95
+ self .assertIsInstance (ctx , ContextVarsRuntimeContext )
You can’t perform that action at this time.
0 commit comments