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 tim.peters
Recipients Tomáš Petříček, jbakker, r.david.murray, rhettinger, serhiy.storchaka, tim.peters
Date 2017-11-19.18:58:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511117907.83.0.213398074469.issue32042@psf.upfronthosting.co.za>
In-reply-to
Content
`doctest` is intended to be anal - there are few things more pointlessly confusing for a user than to see docs that don't match what they actually see when they run the doc's examples.  "Is it a bug?  Did I do it wrong?  Why can't they document what it actually does?! ..."

Things like +ELLIPSIS are intended for cases where the output is _known_ to vary across platforms or runs in ways that can't otherwise be easily hidden (like output that embeds the `id()` of an object), or where only a relatively tiny bit of enormous output is actually interesting.

When someone wants unittest's `assertEqual()`, they should use unittest ;-)  

Although that functionality is already easily handled; for example, here's the OP's first example rewritten to be independent of the dict's representation ordering:

>>> dict_fun() == {'foo': 1, 'bar': 2}
True

Now it's testing what you want to test:  that the results of the expressions on both sides of `==` compare equal.  And this is, to me, clearer on the face of it than introducing a new flag.
History
Date User Action Args
2017-11-19 18:58:27tim.peterssetrecipients: + tim.peters, rhettinger, r.david.murray, serhiy.storchaka, jbakker, Tomáš Petříček
2017-11-19 18:58:27tim.peterssetmessageid: <1511117907.83.0.213398074469.issue32042@psf.upfronthosting.co.za>
2017-11-19 18:58:27tim.peterslinkissue32042 messages
2017-11-19 18:58:27tim.peterscreate