Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test random shuffle #71318

Closed
JonathanKross mannequin opened this issue May 26, 2016 · 8 comments
Closed

Unit test random shuffle #71318

JonathanKross mannequin opened this issue May 26, 2016 · 8 comments
Assignees
Labels
tests Tests in the Lib/test dir

Comments

@JonathanKross
Copy link
Mannequin

JonathanKross mannequin commented May 26, 2016

BPO 27131
Nosy @rhettinger, @JonathanKross
Files
  • test_random_shuffle.patch: unit test patch for Random shuffle method
  • test_random_shuffle.patch: v2 test random shuffle patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/rhettinger'
    closed_at = <Date 2016-07-29.06:09:15.683>
    created_at = <Date 2016-05-26.15:28:07.954>
    labels = ['tests']
    title = 'Unit test random shuffle'
    updated_at = <Date 2016-07-29.06:09:15.681>
    user = 'https://github.com/JonathanKross'

    bugs.python.org fields:

    activity = <Date 2016-07-29.06:09:15.681>
    actor = 'rhettinger'
    assignee = 'rhettinger'
    closed = True
    closed_date = <Date 2016-07-29.06:09:15.683>
    closer = 'rhettinger'
    components = ['Tests']
    creation = <Date 2016-05-26.15:28:07.954>
    creator = 'jonathan.kross'
    dependencies = []
    files = ['43017', '43019']
    hgrepos = []
    issue_num = 27131
    keywords = ['patch']
    message_count = 8.0
    messages = ['266442', '266445', '266452', '268440', '268441', '270213', '271557', '271609']
    nosy_count = 2.0
    nosy_names = ['rhettinger', 'jonathan.kross']
    pr_nums = []
    priority = 'normal'
    resolution = 'rejected'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue27131'
    versions = ['Python 3.6']

    @JonathanKross JonathanKross mannequin added the tests Tests in the Lib/test dir label May 26, 2016
    @rhettinger
    Copy link
    Contributor

    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.

    @JonathanKross
    Copy link
    Mannequin Author

    JonathanKross mannequin commented May 26, 2016

    Changed the test to assertCountEqual which will check that all the inputs are present and equal in the output.

    @rhettinger
    Copy link
    Contributor

    Okay, this looks fine. I'll apply it within a few days.

    @rhettinger rhettinger self-assigned this May 26, 2016
    @JonathanKross
    Copy link
    Mannequin Author

    JonathanKross mannequin commented Jun 13, 2016

    Just checking in on this patch. Any chance of getting it applied within the next few days?

    @rhettinger
    Copy link
    Contributor

    Yes

    @JonathanKross
    Copy link
    Mannequin Author

    JonathanKross mannequin commented Jul 11, 2016

    Just giving this one a bump to see if it can be applied soon.

    1 similar comment
    @JonathanKross
    Copy link
    Mannequin Author

    JonathanKross mannequin commented Jul 28, 2016

    Just giving this one a bump to see if it can be applied soon.

    @rhettinger
    Copy link
    Contributor

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant