We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd9c40f commit a439678Copy full SHA for a439678
python/embedded_python_test.go
@@ -6,9 +6,6 @@ import (
6
"github.com/stretchr/testify/assert"
7
"io"
8
"math/rand"
9
- "os/exec"
10
- "path/filepath"
11
- "runtime"
12
"testing"
13
)
14
@@ -19,13 +16,10 @@ func TestEmbeddedPython(t *testing.T) {
19
16
defer ep.Cleanup()
20
17
path := ep.GetExtractedPath()
21
18
assert.NotEqual(t, path, "")
22
- pexe := filepath.Join(path, "bin/python3")
23
- if runtime.GOOS == "windows" {
24
- pexe += ".exe"
25
- }
+ pexe := ep.GetExePath()
26
assert.True(t, internal.Exists(pexe))
27
28
- cmd := exec.Command(pexe, "-c", "print('test')")
+ cmd := ep.PythonCmd("-c", "print('test')")
29
stdout, err := cmd.StdoutPipe()
30
assert.NoError(t, err)
31
defer stdout.Close()
0 commit comments