writeFakePythonScript is a helper to create fake python3 executable
(t *testing.T, binDir, version string)
| 480 | } |
| 481 | |
| 482 | // writeFakePythonScript is a helper to create fake python3 executable |
| 483 | func writeFakePythonScript(t *testing.T, binDir, version string) string { |
| 484 | t.Helper() |
| 485 | fakePython := filepath.Join(binDir, "python3") |
| 486 | content := fmt.Sprintf("#!/bin/sh\necho 'Python %s'\n", version) |
| 487 | if err := os.WriteFile(fakePython, []byte(content), 0755); err != nil { |
| 488 | t.Fatalf("Failed to write fake python script: %v", err) |
| 489 | } |
| 490 | return fakePython |
| 491 | } |
| 492 | |
| 493 | func TestParseExecPrefix(t *testing.T) { |
no test coverage detected