diff options
-rw-r--r-- | preproc/sauvola_test.go | 6 | ||||
-rw-r--r-- | preproc/test_helpers.go (renamed from preproc/helpers_test.go) | 1 |
2 files changed, 6 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) } diff --git a/preproc/helpers_test.go b/preproc/test_helpers.go index 326b59d..7579e88 100644 --- a/preproc/helpers_test.go +++ b/preproc/test_helpers.go @@ -11,6 +11,7 @@ import ( "os" ) +var slow = flag.Bool("slow", false, "include slow tests") var update = flag.Bool("update", false, "update golden files") func decode(s string) (*image.Gray, error) { |