mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 15:31:23 +08:00
fix: unittest
This commit is contained in:
@@ -452,6 +452,6 @@ func GenNameWithTimestamp(tmpl string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func IsZeroFloat64(f float64) bool {
|
func IsZeroFloat64(f float64) bool {
|
||||||
threshold := 1e-3
|
threshold := 1e-9
|
||||||
return math.Abs(f) < threshold
|
return math.Abs(f) < threshold
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ func TestTapUIWithScreenshot(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = driver.TapByUIDetection([]string{"dyhouse", "shoppingbag"})
|
err = driver.TapByUIDetection(
|
||||||
|
WithScreenShotUITypes("dyhouse", "shoppingbag"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user