Add basic tests for _histograms.

This commit is contained in:
Stefan van der Walt
2009-11-07 18:13:02 +02:00
parent 0cc86e62c5
commit a99339f9d6
2 changed files with 16 additions and 0 deletions
@@ -0,0 +1,16 @@
from numpy.testing import *
import numpy as np
import scikits.image.io._plugins._colormixer as cm
from scikits.image.io._plugins._histograms import histograms
class TestHistogram:
def test_basic(self):
img = np.ones((50, 50, 3), dtype=np.uint8)
r, g, b, v = histograms(img, 255)
for band in (r, g, b, v):
yield assert_equal, band.sum(), 50*50
if __name__ == "__main__":
run_module_suite()