summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-03-07 07:23:55 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-03-07 07:23:55 (GMT)
commit1f58f4fa6a0e3c60cee8df4a35c8dcf3903acde8 (patch)
tree000fd3c9b3cdbb73af20de9c9ad76a589f007b78 /Lib
parent318d537daabf2bd5f781255c7e25bfce260cf227 (diff)
downloadcpython-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.py3
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):