summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_statistics.py
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2022-07-26 07:23:33 (GMT)
committerGitHub <noreply@github.com>2022-07-26 07:23:33 (GMT)
commit4395ff1e6a18fb26c7a66b1c29b34ed60ddd001c (patch)
tree3a9eed8eeba2e1dabeeffd38f79165cc24d05936 /Lib/test/test_statistics.py
parentb7ce4625fe2a8a4d6c1db6b39b52c7f97d384caa (diff)
downloadcpython-4395ff1e6a18fb26c7a66b1c29b34ed60ddd001c.zip
cpython-4395ff1e6a18fb26c7a66b1c29b34ed60ddd001c.tar.gz
cpython-4395ff1e6a18fb26c7a66b1c29b34ed60ddd001c.tar.bz2
Statistics inv_cdf sync with corresponding random module normal distributions (#95265)
Diffstat (limited to 'Lib/test/test_statistics.py')
-rw-r--r--Lib/test/test_statistics.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_statistics.py b/Lib/test/test_statistics.py
index 6de9824..bf85525 100644
--- a/Lib/test/test_statistics.py
+++ b/Lib/test/test_statistics.py
@@ -2801,9 +2801,10 @@ class TestNormalDist:
iq.inv_cdf(1.0) # p is one
with self.assertRaises(self.module.StatisticsError):
iq.inv_cdf(1.1) # p over one
- with self.assertRaises(self.module.StatisticsError):
- iq = NormalDist(100, 0) # sigma is zero
- iq.inv_cdf(0.5)
+
+ # Supported case:
+ iq = NormalDist(100, 0) # sigma is zero
+ self.assertEqual(iq.inv_cdf(0.5), 100)
# Special values
self.assertTrue(math.isnan(Z.inv_cdf(float('NaN'))))