Title: Unit test random shuffle
Type: Stage:
Components: Tests Versions: Python 3.6
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: jonathan.kross, rhettinger
Priority: normal Keywords: patch

Created on 2016-05-26 15:28 by jonathan.kross, last changed 2016-07-29 06:09 by rhettinger. This issue is now closed.

File name Uploaded Description Edit
test_random_shuffle.patch jonathan.kross, 2016-05-26 15:28 unit test patch for Random shuffle method review
test_random_shuffle.patch jonathan.kross, 2016-05-26 18:04 v2 test random shuffle patch review
Messages (8)
msg266442 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-05-26 15:39
This tests that a specific shuffle result is obtained (which is an implementation specific detail subject to change).  An alternate possible test would just check to see that all the inputs are present in the output.
msg266445 - (view) Author: Jonathan Kross (jonathan.kross) * Date: 2016-05-26 18:04
Changed the test to assertCountEqual which will check that all the inputs are present and equal in the output.
msg266452 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-05-26 20:00
Okay, this looks fine.  I'll apply it within a few days.
msg268440 - (view) Author: Jonathan Kross (jonathan.kross) * Date: 2016-06-13 14:22
Just checking in on this patch. Any chance of getting it applied within the next few days?
msg268441 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-06-13 14:38
msg270213 - (view) Author: Jonathan Kross (jonathan.kross) * Date: 2016-07-11 22:48
Just giving this one a bump to see if it can be applied soon.
msg271557 - (view) Author: Jonathan Kross (jonathan.kross) * Date: 2016-07-28 15:10
Just giving this one a bump to see if it can be applied soon.
msg271609 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-07-29 06:09
I've just looked at the existing tests for random.shuffle() and found that they already cover this case and do a much more thorough job.  The suggested patch doesn't add anything.   Sorry, I'm going to close this one -- there isn't any problem being solved.
Date User Action Args
2016-07-29 06:09:15rhettingersetstatus: open -> closed
resolution: rejected
messages: + msg271609
2016-07-28 15:10:28jonathan.krosssetmessages: + msg271557
2016-07-11 22:48:33jonathan.krosssetmessages: + msg270213
2016-06-13 14:38:37rhettingersetmessages: + msg268441
2016-06-13 14:22:51jonathan.krosssetmessages: + msg268440
2016-05-26 20:00:05rhettingersetassignee: rhettinger
messages: + msg266452
2016-05-26 18:04:02jonathan.krosssetfiles: + test_random_shuffle.patch

messages: + msg266445
2016-05-26 15:39:06rhettingersetnosy: + rhettinger
messages: + msg266442
2016-05-26 15:28:08jonathan.krosscreate