diff --git a/libs/python/pythontest/pythontest.go b/libs/python/pythontest/pythontest.go index e43a1974b..9a2dec0ee 100644 --- a/libs/python/pythontest/pythontest.go +++ b/libs/python/pythontest/pythontest.go @@ -42,9 +42,6 @@ func CreatePythonEnv(opts *VenvOpts) error { if opts.Name == "" { opts.Name = testutil.RandomName("test-venv-") } - if opts.Dir != "" { - opts.Dir = "." - } cmd := exec.Command("uv", "venv", opts.Name, "--python", opts.PythonVersion, "--seed", "-q") cmd.Stdout = os.Stdout diff --git a/libs/python/pythontest/pythontest_test.go b/libs/python/pythontest/pythontest_test.go index 8af24d718..3161092d3 100644 --- a/libs/python/pythontest/pythontest_test.go +++ b/libs/python/pythontest/pythontest_test.go @@ -15,7 +15,11 @@ func TestVenvSuccess(t *testing.T) { for _, pythonVersion := range []string{"3.11", "3.12"} { t.Run(pythonVersion, func(t *testing.T) { ctx := context.Background() - opts := VenvOpts{PythonVersion: pythonVersion} + dir := t.TempDir() + opts := VenvOpts{ + PythonVersion: pythonVersion, + Dir: dir, + } RequireActivatedPythonEnv(t, ctx, &opts) require.DirExists(t, opts.EnvPath) require.DirExists(t, opts.BinPath)