File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
tests/integrations/stdlib Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
1
import subprocess
2
+ import sys
2
3
3
4
from sentry_sdk import Hub , capture_message
4
5
from sentry_sdk .integrations .stdlib import StdlibIntegration
@@ -9,13 +10,14 @@ def test_subprocess_basic(sentry_init, capture_events):
9
10
10
11
with Hub .current .trace (transaction = "foo" , op = "foo" ) as span :
11
12
output = subprocess .check_output (
12
- "python -c '"
13
- "import sentry_sdk; "
14
- "from sentry_sdk.integrations.stdlib import get_subprocess_traceparent_headers; "
15
- "sentry_sdk.init(); "
16
- "print(dict(get_subprocess_traceparent_headers()))"
17
- "'" ,
18
- shell = True ,
13
+ [
14
+ sys .executable ,
15
+ "-c" ,
16
+ "import sentry_sdk; "
17
+ "from sentry_sdk.integrations.stdlib import get_subprocess_traceparent_headers; "
18
+ "sentry_sdk.init(); "
19
+ "print(dict(get_subprocess_traceparent_headers()))" ,
20
+ ]
19
21
)
20
22
21
23
assert span .trace_id in str (output )
You can’t perform that action at this time.
0 commit comments