8000 fix: Use sys.executable · getsentry/sentry-python@60ec0cc · GitHub
[go: up one dir, main page]

Skip to content

Commit 60ec0cc

Browse files
committed
fix: Use sys.executable
1 parent 7673551 commit 60ec0cc

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/integrations/stdlib/test_subprocess.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import subprocess
2+
import sys
23

34
from sentry_sdk import Hub, capture_message
45
from sentry_sdk.integrations.stdlib import StdlibIntegration
@@ -9,13 +10,14 @@ def test_subprocess_basic(sentry_init, capture_events):
910

1011
with Hub.current.trace(transaction="foo", op="foo") as span:
1112
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+
]
1921
)
2022

2123
assert span.trace_id in str(output)

0 commit comments

Comments
 (0)
0