Mercurial > hg > numerics
comparison tests/test_histogram.py @ 68:07362c531a7e
stub histogram tests
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Sat, 28 Feb 2015 16:13:14 -0800 |
| parents | |
| children | 8e93d7357c6b |
comparison
equal
deleted
inserted
replaced
| 67:a09d5ffd2fc9 | 68:07362c531a7e |
|---|---|
| 1 #!/usr/bin/env python | |
| 2 # -*- coding: utf-8 -*- | |
| 3 | |
| 4 """ | |
| 5 unit tests for histograms | |
| 6 """ | |
| 7 | |
| 8 import os | |
| 9 import sys | |
| 10 import unittest | |
| 11 from numerics.histogram import Histogram | |
| 12 | |
| 13 # globals | |
| 14 here = os.path.dirname(os.path.abspath(__file__)) | |
| 15 | |
| 16 class HistogramUnitTest(unittest.TestCase): | |
| 17 | |
| 18 def test_histogram(self): | |
| 19 """basic histogram test""" | |
| 20 | |
| 21 # make some test data | |
| 22 data = [0,0,1,1,2,3,4,5,6,7,8,8,8] | |
| 23 bins = range(0,10) | |
| 24 | |
| 25 # make a histogram | |
| 26 h = Histogram(bins) | |
| 27 | |
| 28 if __name__ == '__main__': | |
| 29 unittest.main() | |
| 30 |
