refactor: move hrp/ to root folder

This commit is contained in:
lilong.129
2025-02-06 10:52:08 +08:00
parent 9376692b71
commit 1f063dd6f7
221 changed files with 206 additions and 211 deletions

21
pkg/convert/to_pytest.go Normal file
View File

@@ -0,0 +1,21 @@
package convert
import (
"github.com/httprunner/funplugin/myexec"
"github.com/pkg/errors"
)
// convert TCase to pytest case
func (c *TCaseConverter) toPyTest() (string, error) {
jsonPath, err := c.toJSON()
if err != nil {
return "", errors.Wrap(err, "convert to JSON case failed")
}
args := append([]string{"make"}, jsonPath)
err = myexec.ExecPython3Command("httprunner", args...)
if err != nil {
return "", err
}
return c.genOutputPath(suffixPyTest), nil
}