make common info tests faster and such
@@ -4,7 +4,7 @@ Tests for the various common informations.
import pytest
-from hypothesis import given, settings, unlimited
+from hypothesis import given, settings, unlimited, HealthCheck
from dit.multivariate import (gk_common_information as K,
caekl_mutual_information as J,
@@ -22,8 +22,8 @@ pytest.importorskip('scipy')
epsilon = 1e-4
@pytest.mark.slow
-@pytest.mark.flaky(reruns=2)
-@settings(timeout=unlimited, min_satisfying_examples=3, max_iterations=250)
+@pytest.mark.flaky(reruns=5)
+@settings(timeout=unlimited, min_satisfying_examples=3, max_examples=10, suppress_health_check=[HealthCheck.hung_test])
@given(dist=distributions(alphabets=(2,)*2))
def test_cis1(dist):
"""
@@ -36,7 +36,6 @@ def test_cis1(dist):
g = G(dist)
f = F(dist)
m = M(dist)
- print("K: {}\nJ: {}\nB: {}\nC: {}\nG: {}\nF: {}\nM: {}".format(k, j, b, c, g, f, m))
assert k <= j + epsilon
assert j <= b + epsilon
assert b <= c + epsilon
@@ -45,8 +44,8 @@ def test_cis1(dist):
assert f <= m + epsilon
@pytest.mark.slow
-@pytest.mark.flaky(reruns=2)
-@settings(timeout=unlimited, min_satisfying_examples=3, max_iterations=250)
+@pytest.mark.flaky(reruns=5)
+@settings(timeout=unlimited, min_satisfying_examples=3, max_examples=10, suppress_health_check=[HealthCheck.hung_test])
@given(dist=distributions(alphabets=(2,)*3))
def test_cis2(dist):
"""
@@ -59,7 +58,6 @@ def test_cis2(dist):
g = G(dist)
f = F(dist)
m = M(dist)
- print("K: {}\nJ: {}\nB: {}\nC: {}\nG: {}\nF: {}\nM: {}".format(k, j, b, c, g, f, m))
assert k <= j + epsilon
assert j <= b + epsilon
assert b <= c + epsilon
