mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-04 23:16:57 +08:00
feat #1342: support specify custom python3 venv
This commit is contained in:
@@ -1,19 +1,10 @@
|
||||
package convert
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/httprunner/httprunner/v4/hrp/internal/builtin"
|
||||
"github.com/httprunner/httprunner/v4/hrp/internal/version"
|
||||
)
|
||||
|
||||
func convert2PyTestScripts(paths ...string) error {
|
||||
httprunner := fmt.Sprintf("httprunner>=%s", version.HttpRunnerMinVersion)
|
||||
python3, err := builtin.EnsurePython3Venv(httprunner)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
args := append([]string{"-m", "httprunner", "make"}, paths...)
|
||||
return builtin.ExecCommand(python3, args...)
|
||||
args := append([]string{"make"}, paths...)
|
||||
return builtin.ExecPython3Command("httprunner", args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user