From fe36bcef77f127178366bfe057c9dbe37aafb2ce Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 18 Dec 2024 18:12:56 +0100 Subject: [PATCH] add debug logf --- integration/bundle/init_default_python_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/integration/bundle/init_default_python_test.go b/integration/bundle/init_default_python_test.go index 685b4a50d7..9e24ac1699 100644 --- a/integration/bundle/init_default_python_test.go +++ b/integration/bundle/init_default_python_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "os" + "os/exec" "path/filepath" "strings" "testing" @@ -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)