refactor: move files

This commit is contained in:
lilong.129 2025-02-06 11:45:39 +08:00
parent 8a7b48a1af
commit 5062c29492
3 changed files with 7 additions and 12 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
*.dll
*.so
*.dylib
*.apk
# Test binary, built with `go test -c`
*.test

View File

@ -10,7 +10,6 @@ import (
"github.com/spf13/cobra"
"github.com/httprunner/httprunner/v5/code"
"github.com/httprunner/httprunner/v5/internal/pytest"
"github.com/httprunner/httprunner/v5/internal/sdk"
)
@ -35,10 +34,15 @@ var pytestCmd = &cobra.Command{
log.Error().Err(err).Msg("python3 venv is not ready")
return errors.Wrap(code.InvalidPython3Venv, err.Error())
}
return pytest.RunPytest(args)
return runPytest(args)
},
}
func init() {
rootCmd.AddCommand(pytestCmd)
}
func runPytest(args []string) error {
args = append([]string{"run"}, args...)
return myexec.ExecPython3Command("httprunner", args...)
}

View File

@ -1,10 +0,0 @@
package pytest
import (
"github.com/httprunner/funplugin/myexec"
)
func RunPytest(args []string) error {
args = append([]string{"run"}, args...)
return myexec.ExecPython3Command("httprunner", args...)
}