@@ -61,8 +61,12 @@ def _test_as_list(env_key, conf_key, default):
61
61
* _test_as_bool ("DD_TRACE_ENABLED" , "trace_enabled" , default = True ),
62
62
* _test_as_bool ("DD_COLD_START_TRACING" , "cold_start_tracing" , default = True ),
63
63
* _test_as_bool ("DD_TRACE_MANAGED_SERVICES" , "make_inferred_span" , default = True ),
64
- * _test_as_bool ("DD_ENCODE_AUTHORIZER_CONTEXT" , "encode_authorizer_context" , default = True ),
65
- * _test_as_bool ("DD_DECODE_AUTHORIZER_CONTEXT" , "decode_authorizer_context" , default = True ),
64
+ * _test_as_bool (
65
+ "DD_ENCODE_AUTHORIZER_CONTEXT" , "encode_authorizer_context" , default = True
66
+ ),
67
+ * _test_as_bool (
68
+ "DD_DECODE_AUTHORIZER_CONTEXT" , "decode_authorizer_context" , default = True
69
+ ),
66
70
* _test_as_bool ("DD_FLUSH_IN_THREAD" , "flush_in_thread" , default = False ),
67
71
* _test_as_bool ("DD_ENHANCED_METRICS" , "enhanced_metrics_enabled" , default = True ),
68
72
* _test_as_bool ("DD_INTEGRATION_TEST" , "integration_test" , default = False ),
@@ -123,15 +127,21 @@ def test_config_from_environ(env_key, conf_key, env_val, conf_val, setenv):
123
127
_test_config_from_environ_depends_on_tracing = (
124
128
* _test_as_bool ("DD_COLD_START_TRACING" , "cold_start_tracing" , default = True ),
125
129
* _test_as_bool ("DD_TRACE_MANAGED_SERVICES" , "make_inferred_span" , default = True ),
126
- * _test_as_bool ("DD_ENCODE_AUTHORIZER_CONTEXT" , "encode_authorizer_context" , default = True ),
127
- * _test_as_bool ("DD_DECODE_AUTHORIZER_CONTEXT" , "decode_authorizer_context" , default = True ),
130
+ * _test_as_bool (
131
+ "DD_ENCODE_AUTHORIZER_CONTEXT" , "encode_authorizer_context" , default = True
132
+ ),
133
+ * _test_as_bool (
134
+ "DD_DECODE_AUTHORIZER_CONTEXT" , "decode_authorizer_context" , default = True
135
+ ),
128
136
)
129
137
130
138
131
139
@pytest .mark .parametrize (
132
140
"env_key,conf_key,env_val,conf_val" , _test_config_from_environ_depends_on_tracing
133
141
)
134
- def test_config_from_environ_depends_on_tracing (env_key , conf_key , env_val , conf_val , setenv ):
142
+ def test_config_from_environ_depends_on_tracing (
143
+ env_key , conf_key , env_val , conf_val , setenv
144
+ ):
135
145
setenv (env_key , env_val )
136
146
setenv ("DD_TRACE_ENABLED" , "false" )
137
147
assert getattr (config , conf_key ) is False
@@ -193,6 +203,7 @@ class Testing:
193
203
test_4 = _get_env ("TEST_4" , "true" , bool , depends_on_tracing = True )
194
204
195
205
logs = []
206
+
196
207
def cap_warn (* args , ** kwargs ):
197
208
logs .append (args )
198
209
0 commit comments