Skip to content

Commit

Permalink
fix: Use sys.executable
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Jul 4, 2019
1 parent 7673551 commit 60ec0cc
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/integrations/stdlib/test_subprocess.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import subprocess
import sys

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

with Hub.current.trace(transaction="foo", op="foo") as span:
output = subprocess.check_output(
"python -c '"
"import sentry_sdk; "
"from sentry_sdk.integrations.stdlib import get_subprocess_traceparent_headers; "
"sentry_sdk.init(); "
"print(dict(get_subprocess_traceparent_headers()))"
"'",
shell=True,
[
sys.executable,
"-c",
"import sentry_sdk; "
"from sentry_sdk.integrations.stdlib import get_subprocess_traceparent_headers; "
"sentry_sdk.init(); "
"print(dict(get_subprocess_traceparent_headers()))",
]
)

assert span.trace_id in str(output)
Expand Down

0 comments on commit 60ec0cc

Please sign in to comment.