mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-40465: Deprecate the optional argument to random.shuffle(). (#19867)
This commit is contained in:
parent
766352320f
commit
190fac99c5
4 changed files with 10 additions and 1 deletions
|
@ -103,7 +103,8 @@ class TestBasicOps:
|
|||
shuffle = self.gen.shuffle
|
||||
mock_random = unittest.mock.Mock(return_value=0.5)
|
||||
seq = bytearray(b'abcdefghijk')
|
||||
shuffle(seq, mock_random)
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
shuffle(seq, mock_random)
|
||||
mock_random.assert_called_with()
|
||||
|
||||
def test_choice(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue