gh-123968: Fix lower bound for python -m random --float (#123971)

This commit is contained in:
Anders Kaseorg 2024-09-12 06:54:18 -07:00 committed by GitHub
parent 8e99495701
commit a362c41bc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View file

@ -1433,8 +1433,8 @@ class CommandLineTest(unittest.TestCase):
("'a a' 'b b' 'c c'", "b b"),
("--integer 5", 4),
("5", 4),
("--float 2.5", 2.266632777287572),
("2.5", 2.266632777287572),
("--float 2.5", 2.1110546288126204),
("2.5", 2.1110546288126204),
]:
random.seed(0)
self.assertEqual(random.main(shlex.split(command)), expected)