mirror of
https://github.com/python/cpython.git
synced 2025-12-09 18:48:05 +00:00
Move error test to the function that needs it. Improve error message. (GH-30008)
This commit is contained in:
parent
50669083fe
commit
3fee7776e6
2 changed files with 4 additions and 11 deletions
|
|
@ -816,10 +816,6 @@ class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase):
|
|||
maxsize+1, maxsize=maxsize
|
||||
)
|
||||
self.gen._randbelow_without_getrandbits(5640, maxsize=maxsize)
|
||||
# issue 33203: test that _randbelow returns zero on
|
||||
# n == 0 also in its getrandbits-independent branch.
|
||||
x = self.gen._randbelow_without_getrandbits(0, maxsize=maxsize)
|
||||
self.assertEqual(x, 0)
|
||||
|
||||
# This might be going too far to test a single line, but because of our
|
||||
# noble aim of achieving 100% test coverage we need to write a case in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue