Skip to content

Commit

Permalink
add debug logf
Browse files Browse the repository at this point in the history
  • Loading branch information
denik committed Dec 18, 2024
1 parent aed837f commit fe36bce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions integration/bundle/init_default_python_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"os"
"os/exec"
"path/filepath"
"strings"
"testing"
Expand Down Expand Up @@ -55,6 +56,17 @@ func setupPython(t testutil.TestingT, ctx context.Context, directory, pythonVers
pythonExe, err := python.DetectExecutable(ctx)
require.NoError(t, err)

t.Logf("pythonExe=%s", pythonExe)

p, err := exec.LookPath("python3")
t.Logf("python3 lookup=%s %s", p, err)

p, err = exec.LookPath("python")
t.Logf("python lookup=%s %s", p, err)

p, err = exec.LookPath("python.exe")
t.Logf("python.exe lookup=%s %s", p, err)

actualVersion := testutil.CaptureCommandOutput(t, pythonExe, "--version")
expectVersion := "Python " + pythonVersion
require.True(t, strings.HasPrefix(actualVersion, expectVersion), "Running %s --version: Expected %v, got %v", pythonExe, expectVersion, actualVersion)
Expand Down

0 comments on commit fe36bce

Please sign in to comment.