[Scipy-svn] r6637 - trunk/scipy/stats/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Sat Jul 24 21:03:10 EDT 2010
Author: warren.weckesser
Date: 2010-07-24 20:03:10 -0500 (Sat, 24 Jul 2010)
New Revision: 6637
Modified:
trunk/scipy/stats/tests/test_stats.py
Log:
Add a couple simple tests for stats.f_oneway.
Modified: trunk/scipy/stats/tests/test_stats.py
===================================================================
--- trunk/scipy/stats/tests/test_stats.py 2010-07-24 06:35:11 UTC (rev 6636)
+++ trunk/scipy/stats/tests/test_stats.py 2010-07-25 01:03:10 UTC (rev 6637)
@@ -4,6 +4,7 @@
BASED ON WILKINSON'S STATISTICS QUIZ
http://www.stanford.edu/~clint/bench/wilk.txt
+ Additional tests by a host of SciPy developers.
"""
from numpy.testing import TestCase, rand, assert_, assert_equal, \
@@ -1748,5 +1749,19 @@
assert_equal(c, np.linspace(9.5,10.5,11))
+class TestFOneWay(TestCase):
+
+ def test_trivial(self):
+ """A trivial test of stats.f_oneway, with F=0."""
+ F, p = stats.f_oneway([0,2], [0,2])
+ assert_equal(F, 0.0)
+
+ def test_basic(self):
+ """A test of stats.f_oneway, with F=2."""
+ F, p = stats.f_oneway([0,2], [2,4])
+ # Despite being a floating point calculation, this data should
+ # result in F being exactly 2.0.
+ assert_equal(F, 2.0)
+
if __name__ == "__main__":
run_module_suite()
More information about the Scipy-svn
mailing list