Permalink
Browse files

TST: add test for .a == .b case

  • Loading branch information...
1 parent 5458d63 commit 69e0bf2848f40eff31fa5932400e25c9a7e51740 @josef-pkt committed Jan 3, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 scipy/stats/tests/test_distributions.py
@@ -939,7 +939,7 @@ def test_norm_logcdf():
np.seterr(**olderr)
def test_hypergeom_interval_1802():
- #these two did not return in a reasonable time, if ever
+ #these two had endless loops
assert_equal(stats.hypergeom.interval(.95, 187601, 43192, 757),
(152.0, 197.0))
assert_equal(stats.hypergeom.interval(.945, 187601, 43192, 757),
@@ -948,6 +948,10 @@ def test_hypergeom_interval_1802():
assert_equal(stats.hypergeom.interval(.94, 187601, 43192, 757),
(153.0, 196.0))
+ #degenerate case .a == .b
+ assert_equal(stats.hypergeom.ppf(0.02, 100, 100, 8), 8)
+ assert_equal(stats.hypergeom.ppf(1, 100, 100, 8), 8)
+
if __name__ == "__main__":
run_module_suite()

0 comments on commit 69e0bf2

Please sign in to comment.