From 5062c294927d7d2d33cb00b97edd61688d247cf1 Mon Sep 17 00:00:00 2001 From: "lilong.129" Date: Thu, 6 Feb 2025 11:45:39 +0800 Subject: [PATCH] refactor: move files --- .gitignore | 1 + cmd/pytest.go | 8 ++++++-- internal/pytest/main.go | 10 ---------- 3 files changed, 7 insertions(+), 12 deletions(-) delete mode 100644 internal/pytest/main.go diff --git a/.gitignore b/.gitignore index 3ece8983..304e1bd9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.dll *.so *.dylib +*.apk # Test binary, built with `go test -c` *.test diff --git a/cmd/pytest.go b/cmd/pytest.go index d1cb51b2..512c0851 100644 --- a/cmd/pytest.go +++ b/cmd/pytest.go @@ -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...) +} diff --git a/internal/pytest/main.go b/internal/pytest/main.go deleted file mode 100644 index bdd6166b..00000000 --- a/internal/pytest/main.go +++ /dev/null @@ -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...) -}