mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-08 07:51:25 +08:00
fix: default output debugtalk_gen.py by building debugtalk.py
This commit is contained in:
@@ -261,9 +261,9 @@ func buildPy(path string, output string) error {
|
||||
// generate debugtalk.py
|
||||
if output == "" {
|
||||
dir, _ := os.Getwd()
|
||||
output = filepath.Join(dir, "debugtalk.py")
|
||||
output = filepath.Join(dir, "debugtalk_gen.py")
|
||||
} else if builtin.IsFolderPathExists(output) {
|
||||
output = filepath.Join(output, "debugtalk.py")
|
||||
output = filepath.Join(output, "debugtalk_gen.py")
|
||||
}
|
||||
err = templateContent.genDebugTalk(output, pyTemplate)
|
||||
if err != nil {
|
||||
|
||||
@@ -17,7 +17,7 @@ func TestRun(t *testing.T) {
|
||||
t.Fatal()
|
||||
}
|
||||
|
||||
err = Run("examples/debugtalk_no_funppy.py", "./debugtalk_gen.py")
|
||||
err = Run("examples/debugtalk_no_funppy.py", "./debugtalk.py")
|
||||
if !assert.Nil(t, err) {
|
||||
t.Fatal()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user