Issue #78 invalid

Floating point number representations in doctest

Maxim Mai
created an issue

expected:

30.3...

got

30.3333333333333332

example:

{{{

!python

File "/Users/maxim/Dropbox/workspace/django-3k/build/tests/modeltests/aggregation/models.py", line ?, in modeltests.aggregation.models.test.API_TESTS Failed example: sorted([(b.name, b.authorsageavg) for b in books]) Expected: [(u'Artificial Intelligence: A Modern Approach', 51.5), (u'Practical Django Projects', 29.0), (u'Python Web Development with Django', 30.3...), (u'Sams Teach Yourself Django in 24 Hours', 45.0)] Got: [('Artificial Intelligence: A Modern Approach', 51.5), ('Practical Django Projects', 29.0), ('Python Web Development with Django', 30.333333333333332), ('Sams Teach Yourself Django in 24 Hours', 45.0)]


}}}

Comments (2)

  1. Log in to comment