mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 15:37:35 +08:00
refactor: move files
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
*.dll
|
*.dll
|
||||||
*.so
|
*.so
|
||||||
*.dylib
|
*.dylib
|
||||||
|
*.apk
|
||||||
|
|
||||||
# Test binary, built with `go test -c`
|
# Test binary, built with `go test -c`
|
||||||
*.test
|
*.test
|
||||||
|
|||||||
+6
-2
@@ -10,7 +10,6 @@ import (
|
|||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/httprunner/httprunner/v5/code"
|
"github.com/httprunner/httprunner/v5/code"
|
||||||
"github.com/httprunner/httprunner/v5/internal/pytest"
|
|
||||||
"github.com/httprunner/httprunner/v5/internal/sdk"
|
"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")
|
log.Error().Err(err).Msg("python3 venv is not ready")
|
||||||
return errors.Wrap(code.InvalidPython3Venv, err.Error())
|
return errors.Wrap(code.InvalidPython3Venv, err.Error())
|
||||||
}
|
}
|
||||||
return pytest.RunPytest(args)
|
return runPytest(args)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(pytestCmd)
|
rootCmd.AddCommand(pytestCmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func runPytest(args []string) error {
|
||||||
|
args = append([]string{"run"}, args...)
|
||||||
|
return myexec.ExecPython3Command("httprunner", args...)
|
||||||
|
}
|
||||||
|
|||||||
@@ -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...)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user