bpo-40465: Deprecate the optional argument to random.shuffle(). (#19867)

This commit is contained in:
Raymond Hettinger 2020-05-02 16:45:32 -07:00 committed by GitHub
parent 766352320f
commit 190fac99c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

View file

@ -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):