summaryrefslogtreecommitdiff
path: root/preproc/sauvola_test.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-05-13 19:46:27 +0100
committerNick White <git@njw.name>2019-05-13 19:46:27 +0100
commit6abca706a944a62231608c4a8d8fbdff81f4ca3c (patch)
treef231898570d7a7e7fbfa1603dc551be6423e6a3d /preproc/sauvola_test.go
parent02a6c66eb77a5b455bcf2d0547d2383074eb7e41 (diff)
Add -slow flag to test to skip slow tests by default
Diffstat (limited to 'preproc/sauvola_test.go')
-rw-r--r--preproc/sauvola_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/preproc/sauvola_test.go b/preproc/sauvola_test.go
index 1397a4f..5582941 100644
--- a/preproc/sauvola_test.go
+++ b/preproc/sauvola_test.go
@@ -35,7 +35,11 @@ func TestBinarization(t *testing.T) {
case "integralsauvola":
actual = IntegralSauvola(orig, c.ksize, c.wsize)
case "sauvola":
- actual = Sauvola(orig, c.ksize, c.wsize)
+ if *slow {
+ actual = Sauvola(orig, c.ksize, c.wsize)
+ } else {
+ t.Skip("Skipping slow test; use -slow to run it.\n")
+ }
default:
t.Fatalf("No method %s\n", c.name)
}