Skip to content

Commit

Permalink
Update test_auto_injection_python.shell
Browse files Browse the repository at this point in the history
  • Loading branch information
plengauer authored Jan 8, 2025
1 parent d3b0fa2 commit 2543e72
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/auto/test_auto_injection_python.shell
Original file line number Diff line number Diff line change
Expand Up @@ -57,38 +57,38 @@ span="$(resolve_span '.name == "echo hello world 5"')"
assert_equals "SpanKind.INTERNAL" $(\echo "$span" | \jq -r '.kind')
assert_not_equals null $(\echo "$span" | \jq -r '.parent_id')

echo '
printf '%s' '
import subprocess
subprocess.run(["echo", "hello", "world", "6"])
with subprocess.Popen(["echo", "hello", "world", "6"], stdout=subprocess.DEVNULL) as proc:
pass
' | python3
assert_equals 0 $?
span="$(resolve_span '.name == "echo hello world 6"')"
assert_equals "SpanKind.INTERNAL" $(\echo "$span" | \jq -r '.kind')
assert_not_equals null $(\echo "$span" | \jq -r '.parent_id')

echo '
printf '%s' '
import subprocess
subprocess.run("echo hello world 7", shell=True)
with subprocess.Popen(["echo", "hello", "world", "7"], stdout=subprocess.DEVNULL) as proc:
pass
' | python3
assert_equals 0 $?
span="$(resolve_span '.name == "echo hello world 7"')"
assert_equals "SpanKind.INTERNAL" $(\echo "$span" | \jq -r '.kind')
assert_not_equals null $(\echo "$span" | \jq -r '.parent_id')

printf '%s' '
echo '
import subprocess
with subprocess.Popen(["echo", "hello", "world", "8"], stdout=subprocess.DEVNULL) as proc:
pass
subprocess.run(["echo", "hello", "world", "8"])
' | python3
assert_equals 0 $?
span="$(resolve_span '.name == "echo hello world 8"')"
assert_equals "SpanKind.INTERNAL" $(\echo "$span" | \jq -r '.kind')
assert_not_equals null $(\echo "$span" | \jq -r '.parent_id')

printf '%s' '
echo '
import subprocess
with subprocess.Popen(["echo", "hello", "world", "9"], stdout=subprocess.DEVNULL) as proc:
pass
subprocess.run("echo hello world 9", shell=True)
' | python3
assert_equals 0 $?
span="$(resolve_span '.name == "echo hello world 9"')"
Expand Down

0 comments on commit 2543e72

Please sign in to comment.