Mercurial > repos > yufei-luo > s_mart
diff smart_toolShed/commons/core/stat/test/Test_F_Stat.py @ 0:e0f8dcca02ed
Uploaded S-MART tool. A toolbox manages RNA-Seq and ChIP-Seq data.
author | yufei-luo |
---|---|
date | Thu, 17 Jan 2013 10:52:14 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/smart_toolShed/commons/core/stat/test/Test_F_Stat.py Thu Jan 17 10:52:14 2013 -0500 @@ -0,0 +1,22 @@ +import unittest +from commons.core.stat.Stat import Stat + + +class Test_F_Stat(unittest.TestCase): + + + def test_output(self): + lValues = [0, -1, -5, 112, 10.2, 0.5, 4, -0.5] + iStat = Stat(lValues) + expString = "n=8 mean=15.025 var=1554.934 sd=39.433 min=-5.000 med=0.250 max=112.000" + self.assertEquals(expString, iStat.string()) + + def test_outputQuantile(self): + lValues = [0, -1, -5, 112, 10.2, 0.5, 4, -0.5] + iStat = Stat(lValues) + expString = "n=8 min=-5.000 Q1=-0.500 median=0.500 Q3=10.200 max=112.000" + self.assertEquals(expString, iStat.stringQuantiles()) + + +if __name__ == "__main__": + unittest.main() \ No newline at end of file