mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
fix: unittest
This commit is contained in:
@@ -18,6 +18,7 @@ const (
|
||||
suffixYAML = ".yaml"
|
||||
suffixGoTest = ".go"
|
||||
suffixPyTest = ".py"
|
||||
suffixHAR = ".har"
|
||||
)
|
||||
|
||||
type FromType int
|
||||
@@ -54,6 +55,25 @@ func (fromType FromType) String() string {
|
||||
}
|
||||
}
|
||||
|
||||
func (fromType FromType) Extensions() []string {
|
||||
switch fromType {
|
||||
case FromTypeYAML:
|
||||
return []string{suffixYAML, ".yml"}
|
||||
case FromTypeHAR:
|
||||
return []string{suffixHAR}
|
||||
case FromTypePostman, FromTypeSwagger:
|
||||
return []string{suffixJSON}
|
||||
case FromTypeCurl:
|
||||
return []string{".txt", ".curl"}
|
||||
case FromTypeGotest:
|
||||
return []string{suffixGoTest}
|
||||
case FromTypePyest:
|
||||
return []string{suffixPyTest}
|
||||
default:
|
||||
return []string{suffixJSON}
|
||||
}
|
||||
}
|
||||
|
||||
type OutputType int
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user