(self)
| 1994 | self.assertEqual(self.func(data), expected) |
| 1995 | |
| 1996 | def test_iter_list_same(self): |
| 1997 | # Test that iter data and list data give the same result. |
| 1998 | |
| 1999 | # This is an explicit test that iterators and lists are treated the |
| 2000 | # same; justification for this test over and above the similar test |
| 2001 | # in UnivariateCommonMixin is that an earlier design had variance and |
| 2002 | # friends swap between one- and two-pass algorithms, which would |
| 2003 | # sometimes give different results. |
| 2004 | data = [random.uniform(-3, 8) for _ in range(1000)] |
| 2005 | expected = self.func(data) |
| 2006 | self.assertEqual(self.func(iter(data)), expected) |
| 2007 | |
| 2008 | class TestPVariance(VarianceStdevMixin, NumericTestCase, UnivariateTypeMixin): |
| 2009 | # Tests for population variance. |
nothing calls this directly
no test coverage detected