[issue24533] Increased Test Coverage for Lib/random.py
Raymond Hettinger
report at bugs.python.org
Fri Aug 23 03:33:49 EDT 2019
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
The test code now includes this:
def test_shuffle_random_argument(self):
# Test random argument to shuffle.
shuffle = self.gen.shuffle
mock_random = unittest.mock.Mock(return_value=0.5)
seq = bytearray(b'abcdefghijk')
shuffle(seq, mock_random)
mock_random.assert_called_with()
Thank you for the suggestion.
----------
resolution: -> out of date
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue24533>
_______________________________________
More information about the Python-bugs-list
mailing list