summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_random.py
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2022-02-15 23:12:15 (GMT)
committerGitHub <noreply@github.com>2022-02-15 23:12:15 (GMT)
commit08ec80113b3b7f7a9eaa3d217494536b63305181 (patch)
tree191ff93a92579d81ae5826a0e3e3cfe520e2d485 /Lib/test/test_random.py
parent1d81fdc4c004511c25f74db0e04ddbbb8a04ce6d (diff)
downloadcpython-08ec80113b3b7f7a9eaa3d217494536b63305181.zip
cpython-08ec80113b3b7f7a9eaa3d217494536b63305181.tar.gz
cpython-08ec80113b3b7f7a9eaa3d217494536b63305181.tar.bz2
bpo-46737: Add default arguments to random.gauss and normalvariate (GH-31360)
Diffstat (limited to 'Lib/test/test_random.py')
-rw-r--r--Lib/test/test_random.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index 5b066d2..32e7868 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -409,6 +409,10 @@ class TestBasicOps:
self.assertRaises(ValueError, self.gen.randbytes, -1)
self.assertRaises(TypeError, self.gen.randbytes, 1.0)
+ def test_mu_sigma_default_args(self):
+ self.assertIsInstance(self.gen.normalvariate(), float)
+ self.assertIsInstance(self.gen.gauss(), float)
+
try:
random.SystemRandom().random()