diff options
author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2019-03-07 07:23:55 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-03-07 07:23:55 (GMT) |
commit | 1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8 (patch) | |
tree | 000fd3c9b3cdbb73af20de9c9ad76a589f007b78 /Lib | |
parent | 318d537daabf2bd5f781255c7e25bfce260cf227 (diff) | |
download | cpython-1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8.zip cpython-1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8.tar.gz cpython-1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8.tar.bz2 |
Refine statistics.NormalDist documentation and improve test coverage (GH-12208)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_statistics.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py index 132b982..a63e4bf 100644 --- a/Lib/test/test_statistics.py +++ b/Lib/test/test_statistics.py @@ -2123,6 +2123,7 @@ class TestNormalDist(unittest.TestCase): 0.3605, 0.3589, 0.3572, 0.3555, 0.3538, ]): self.assertAlmostEqual(Z.pdf(x / 100.0), px, places=4) + self.assertAlmostEqual(Z.pdf(-x / 100.0), px, places=4) # Error case: variance is zero Y = NormalDist(100, 0) with self.assertRaises(statistics.StatisticsError): @@ -2262,7 +2263,7 @@ class TestNormalDist(unittest.TestCase): self.assertEqual(X * y, NormalDist(1000, 150)) # __mul__ self.assertEqual(y * X, NormalDist(1000, 150)) # __rmul__ self.assertEqual(X / y, NormalDist(10, 1.5)) # __truediv__ - with self.assertRaises(TypeError): + with self.assertRaises(TypeError): # __rtruediv__ y / X def test_equality(self): |