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

Docstring for fractions.Fraction.limit_denominator fails #51628

Closed
florentx mannequin opened this issue Nov 23, 2009 · 2 comments
Closed

Docstring for fractions.Fraction.limit_denominator fails #51628

florentx mannequin opened this issue Nov 23, 2009 · 2 comments
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir

Comments

@florentx
Copy link
Mannequin

florentx mannequin commented Nov 23, 2009

BPO 7379
Nosy @mdickinson, @florentx

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 2009-11-23.16:29:48.326>
created_at = <Date 2009-11-23.11:55:06.283>
labels = ['tests', 'library']
title = 'Docstring for fractions.Fraction.limit_denominator fails'
updated_at = <Date 2009-11-23.16:29:48.212>
user = 'https://github.com/florentx'

bugs.python.org fields:

activity = <Date 2009-11-23.16:29:48.212>
actor = 'mark.dickinson'
assignee = 'none'
closed = True
closed_date = <Date 2009-11-23.16:29:48.326>
closer = 'mark.dickinson'
components = ['Library (Lib)', 'Tests']
creation = <Date 2009-11-23.11:55:06.283>
creator = 'flox'
dependencies = []
files = []
hgrepos = []
issue_num = 7379
keywords = []
message_count = 2.0
messages = ['95620', '95635']
nosy_count = 2.0
nosy_names = ['mark.dickinson', 'flox']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue7379'
versions = ['Python 2.6', 'Python 3.1', 'Python 2.7', 'Python 3.2']

@florentx
Copy link
Mannequin Author

florentx mannequin commented Nov 23, 2009

Yes, you can reduce the fraction 1234/5678.
Bad Luck :p

~ $ python3 -m doctest /usr/lib/python3.1/fractions.py


File "/usr/lib/python3.1/fractions.py", line 165, in
fractions.Fraction.limit_denominator
Failed example:
Fraction(1234, 5678).limit_denominator(10000)
Expected:
Fraction(1234, 5678)
Got:
Fraction(617, 2839)


1 items had failures:
1 of 3 in fractions.Fraction.limit_denominator
***Test Failed*** 1 failures.
~ $

@florentx florentx mannequin added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir labels Nov 23, 2009
@mdickinson
Copy link
Member

Thanks for the report! Fixed in r76456 through r76459.

@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
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

1 participant