update: httprunner make v4

This commit is contained in:
buyuxiang
2022-05-26 16:04:46 +08:00
parent d288d672f8
commit ecd61c815f
10 changed files with 95 additions and 219 deletions
+2 -3
View File
@@ -241,7 +241,6 @@ func (c *TCaseConverter) ToGoTest() (string, error) {
type ICaseConverter interface {
Struct() *TCaseConverter
ToJSON() (string, error)
ToJSONTemp() (string, error)
ToYAML() (string, error)
ToGoTest() (string, error)
ToPyTest() (string, error)
@@ -345,8 +344,8 @@ func makeTestCaseFromJSONYAML(iCaseConverter ICaseConverter) (*hrp.TCase, error)
}
func convertToPyTest(iCaseConverter ICaseConverter) (string, error) {
// convert to temporary json testcase compatible with python engine style
jsonPath, err := iCaseConverter.ToJSONTemp()
// convert to temporary json testcase
jsonPath, err := iCaseConverter.ToJSON()
inputType := iCaseConverter.Struct().InputType
if err != nil {
return "", errors.Wrapf(err, "(%s -> pytest step 1) failed to convert to temporary json testcase", inputType.String())