homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients jedie, rhettinger, tarek
Date 2008年07月10日.14:13:34
SpamBayes Score 0.0005365759
Marked as misclassified No
Message-id <1215699216.92.0.302613073547.issue3332@psf.upfronthosting.co.za>
In-reply-to
Content
Closing as not a bug.
FWIW, here's the relevant text from the docs:
---------------------------------------------
23.2.3.6 Warnings 
doctest is serious about requiring exact matches in expected output. If 
even a single character doesn't match, the test fails. This will 
probably surprise you a few times, as you learn exactly what Python 
does and doesn't guarantee about output. For example, when printing a 
dict, Python doesn't guarantee that the key-value pairs will be printed 
in any particular order, so a test like 
>>> foo()
{"Hermione": "hippogryph", "Harry": "broomstick"}
is vulnerable! One workaround is to do 
>>> foo() == {"Hermione": "hippogryph", "Harry": "broomstick"}
True
instead. Another is to do 
>>> d = foo().items()
>>> d.sort()
>>> d
[('Harry', 'broomstick'), ('Hermione', 'hippogryph')]
History
Date User Action Args
2008年07月10日 14:13:37rhettingersetspambayes_score: 0.000536576 -> 0.0005365759
recipients: + rhettinger, jedie, tarek
2008年07月10日 14:13:36rhettingersetspambayes_score: 0.000536576 -> 0.000536576
messageid: <1215699216.92.0.302613073547.issue3332@psf.upfronthosting.co.za>
2008年07月10日 14:13:35rhettingerlinkissue3332 messages
2008年07月10日 14:13:34rhettingercreate

AltStyle によって変換されたページ (->オリジナル) /