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

Remove redundant definition of factorial on test_random #72662

Closed
franciscouzo mannequin opened this issue Oct 19, 2016 · 2 comments
Closed

Remove redundant definition of factorial on test_random #72662

franciscouzo mannequin opened this issue Oct 19, 2016 · 2 comments
Labels
tests Tests in the Lib/test dir

Comments

@franciscouzo
Copy link
Mannequin

franciscouzo mannequin commented Oct 19, 2016

BPO 28476
Nosy @vstinner, @franciscouzo
Files
  • test_random.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 = None
    closed_at = <Date 2016-10-19.08:11:57.219>
    created_at = <Date 2016-10-19.08:03:45.947>
    labels = ['tests']
    title = 'Remove redundant definition of factorial on test_random'
    updated_at = <Date 2016-10-19.08:13:25.296>
    user = 'https://github.com/franciscouzo'

    bugs.python.org fields:

    activity = <Date 2016-10-19.08:13:25.296>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-10-19.08:11:57.219>
    closer = 'python-dev'
    components = ['Tests']
    creation = <Date 2016-10-19.08:03:45.947>
    creator = 'franciscouzo'
    dependencies = []
    files = ['45142']
    hgrepos = []
    issue_num = 28476
    keywords = ['patch']
    message_count = 2.0
    messages = ['278965', '278966']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'python-dev', 'franciscouzo']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue28476'
    versions = []

    @franciscouzo franciscouzo mannequin added the tests Tests in the Lib/test dir label Oct 19, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 19, 2016

    New changeset c6588a7443a4 by Victor Stinner in branch 'default':
    Close bpo-28476: Reuse math.factorial() in test_random
    https://hg.python.org/cpython/rev/c6588a7443a4

    @python-dev python-dev mannequin closed this as completed Oct 19, 2016
    @vstinner
    Copy link
    Member

    Thanks for your contribution Francisco.

    test_random still pass. I pushed your safe and well contained patch. It don't see any good reason why test_random had its own pure (and slow) Python implementation of factorial(), it's probably because test_random.py was written before math.factorial() was added (Python 2.6).

    @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