No idea why, but this fixes the test on python2
@@ -8,6 +8,7 @@ import expan.core.statistics as statx
from expan.core.util import find_value_by_key_with_condition
from .util import *
+warnings.simplefilter('always')
class StatisticsTestCase(unittest.TestCase):
def setUp(self):
@@ -202,7 +203,6 @@ class PooledStdTestCases(StatisticsTestCase):
def test__pooled_std__variances_differ_too_much_error(self):
""" Warning raised when variances differ too much. """
with warnings.catch_warnings(record=True) as w:
- warnings.simplefilter('always')
statx.pooled_std(0.25, 4, 0.5, 4)
self.assertEqual(len(w), 1)
self.assertTrue(issubclass(w[-1].category, UserWarning))
